All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Hao Wu <wuhaotsh@google.com>,
	peter.maydell@linaro.org, Thomas Huth <thuth@redhat.com>
Cc: minyard@acm.org, titusr@google.com, venture@google.com,
	qemu-devel@nongnu.org, hskinnemoen@google.com,
	kfting@nuvoton.com, qemu-arm@nongnu.org, Avi.Fishman@nuvoton.com
Subject: Re: [PATCH 4/7] hw/adc: Make adci[*] R/W in NPCM7XX ADC
Date: Fri, 20 Aug 2021 09:28:38 +0200	[thread overview]
Message-ID: <6c188624-ea14-b85c-65af-83a36e2f83d7@amsat.org> (raw)
In-Reply-To: <20210813233353.2099459-5-wuhaotsh@google.com>

On 8/14/21 1:33 AM, Hao Wu wrote:
> Our sensor test requires both reading and writing from a sensor's
> QOM property. So we need to make the input of ADC module R/W instead
> of read only for that to work.
> 
> Signed-off-by: Hao Wu <wuhaotsh@google.com>
> Reviewed-by: Titus Rwantare <titusr@google.com>
> ---
>  hw/adc/npcm7xx_adc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/adc/npcm7xx_adc.c b/hw/adc/npcm7xx_adc.c
> index 47fb9e5f74..bc6f3f55e6 100644
> --- a/hw/adc/npcm7xx_adc.c
> +++ b/hw/adc/npcm7xx_adc.c
> @@ -242,7 +242,7 @@ static void npcm7xx_adc_init(Object *obj)
>  
>      for (i = 0; i < NPCM7XX_ADC_NUM_INPUTS; ++i) {
>          object_property_add_uint32_ptr(obj, "adci[*]",
> -                &s->adci[i], OBJ_PROP_FLAG_WRITE);
> +                &s->adci[i], OBJ_PROP_FLAG_READWRITE);

What about:

  qtest_enabled() ? OBJ_PROP_FLAG_READWRITE : OBJ_PROP_FLAG_WRITE

>      }
>      object_property_add_uint32_ptr(obj, "vref",
>              &s->vref, OBJ_PROP_FLAG_WRITE);
> 



  reply	other threads:[~2021-08-20  7:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 23:33 [PATCH 0/7] Misc NPCM7XX patches Hao Wu
2021-08-13 23:33 ` [PATCH 1/7] hw/i2c: Clear ACK bit in NPCM7xx SMBus module Hao Wu
2021-08-13 23:33 ` [PATCH 2/7] hw/i2c: Read FIFO during RXF_CTL change in NPCM7XX SMBus Hao Wu
2021-08-13 23:33 ` [PATCH 3/7] hw/adc: Fix CONV bit in NPCM7XX ADC CON register Hao Wu
2021-08-13 23:33 ` [PATCH 4/7] hw/adc: Make adci[*] R/W in NPCM7XX ADC Hao Wu
2021-08-20  7:28   ` Philippe Mathieu-Daudé [this message]
2021-08-13 23:33 ` [PATCH 5/7] hw/nvram: Add a new auxiliary function to init at24c eeprom Hao Wu
2021-08-19 13:59   ` Peter Maydell
2021-08-13 23:33 ` [PATCH 6/7] hw/arm: quanta-gbs-bmc add i2c devices Hao Wu
2021-08-19 13:55   ` Peter Maydell
2021-08-13 23:33 ` [PATCH 7/7] hw/arm: Use unit number in quanta-gsj eeprom files Hao Wu
2021-08-19 14:00 ` [PATCH 0/7] Misc NPCM7XX patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c188624-ea14-b85c-65af-83a36e2f83d7@amsat.org \
    --to=f4bug@amsat.org \
    --cc=Avi.Fishman@nuvoton.com \
    --cc=hskinnemoen@google.com \
    --cc=kfting@nuvoton.com \
    --cc=minyard@acm.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=titusr@google.com \
    --cc=venture@google.com \
    --cc=wuhaotsh@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.