public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: William Breathitt Gray <william.gray@linaro.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] iio: addac: stx104: Migrate to the regmap API
Date: Sat, 1 Apr 2023 14:49:06 +0100	[thread overview]
Message-ID: <20230401144906.709558bd@jic23-huawei> (raw)
In-Reply-To: <ZCGBIAvr7OQLwNXv@smile.fi.intel.com>


> 
> > +	gpio_config = (struct gpio_regmap_config) {
> > +		.parent = dev,
> > +		.regmap = dio_map,
> > +		.ngpio = STX104_NGPIO,
> > +		.names = stx104_names,
> > +		.reg_dat_base = GPIO_REGMAP_ADDR(STX104_DIO_REG),
> > +		.reg_set_base = GPIO_REGMAP_ADDR(STX104_DIO_REG),
> > +		.ngpio_per_reg = STX104_NGPIO,
> > +		.reg_mask_xlate = stx104_reg_mask_xlate,
> > +		.drvdata = dio_map,
> > +	};  
> 
> Not sure of compound literal is good to have in such case, but if
> Jonathan asked for that...

I didn't like the separately zeroing of the structure in a different
place in the code.  This avoids that (but then so would using an explicit
memset just before filling the rest in.)

Jonathan




  reply	other threads:[~2023-04-01 13:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26 22:05 [PATCH v3 0/2] Migrate STX104 to the regmap API William Breathitt Gray
2023-03-26 22:05 ` [PATCH v3 1/2] iio: addac: stx104: Migrate " William Breathitt Gray
2023-03-27 11:42   ` Andy Shevchenko
2023-04-01 13:49     ` Jonathan Cameron [this message]
2023-04-01 13:51     ` Jonathan Cameron
2023-04-01 13:43       ` William Breathitt Gray
2023-04-01 14:06     ` William Breathitt Gray
2023-04-02 16:46       ` Jonathan Cameron
2023-04-02 14:51         ` William Breathitt Gray
2023-03-26 22:05 ` [PATCH v3 2/2] iio: addac: stx104: Use regmap_read_poll_timeout() for conversion poll William Breathitt Gray

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=20230401144906.709558bd@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=william.gray@linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox