All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kent Gustavsson <kent@minoris.se>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Cosmin Tanislav <demonsingur@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	ChiYuan Huang <cy_huang@richtek.com>,
	Haibo Chen <haibo.chen@nxp.com>,
	Ramona Bolboaca <ramona.bolboaca@analog.com>,
	Ibrahim Tilki <Ibrahim.Tilki@analog.com>,
	ChiaEn Wu <chiaen_wu@richtek.com>,
	William Breathitt Gray <william.gray@linaro.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] iio: adc: mcp3911: add support for the whole MCP39xx family
Date: Sat, 5 Aug 2023 11:17:21 +0200	[thread overview]
Message-ID: <ZM4ToQ4EiuEwlbEi@gmail.com> (raw)
In-Reply-To: <ZM1Td+v3tcoaID9v@smile.fi.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]


Hi Andy,

Thanks for your revew!

[...]
> 
> > +static int mcp3910_get_offset(struct mcp3911 *adc, int channel, int *val)
> > +{
> > +	return mcp3911_read(adc, MCP3910_OFFCAL(channel), val, 3);
> 
> Just to be sure, the proper endianess conversion is done in mcp3911_read()
> and mcp3911_write() calls?
> 
> This question applies to all calls to that APIs.

Yes it does.

[...]

> 
> > +static int mcp3910_get_osr(struct mcp3911 *adc, int *val)
> > +{
> > +	int ret = mcp3911_read(adc, MCP3910_REG_CONFIG0, val, 3);
> 
> Have you run checkpatch? Here should be a blank line. Same in other several
> places.

Yes, checkpatch does not report any warning for this.

[...]

> > +	adc->chip = (struct mcp3911_chip_info *)spi_get_device_id(spi)->driver_data;
> 
> Can't you use spi_get_device_match_data()?
> 
> ...

Will go for spi_get_device_match_data().

[...]

> 
> > +		device_property_read_u32(&adc->spi->dev, "device-addr", &adc->dev_addr);
> 
> With
> 
> 	struct device *dev = &adc->spi->dev;
> 
> lines like this will be neater.

Indeed, but I think I will short it down to just spi->dev.

> 
> 
> 

Best regards,
Marcus Folkesson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2023-08-05  9:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04 10:02 [PATCH v2 1/2] dt-bindings: iio: adc: mcp3911: add support for the whole MCP39xx family Marcus Folkesson
2023-08-04 10:02 ` [PATCH v2 2/2] " Marcus Folkesson
2023-08-04 19:37   ` Andy Shevchenko
2023-08-05  9:17     ` Marcus Folkesson [this message]

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=ZM4ToQ4EiuEwlbEi@gmail.com \
    --to=marcus.folkesson@gmail.com \
    --cc=Ibrahim.Tilki@analog.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=chiaen_wu@richtek.com \
    --cc=conor+dt@kernel.org \
    --cc=cy_huang@richtek.com \
    --cc=demonsingur@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=haibo.chen@nxp.com \
    --cc=jic23@kernel.org \
    --cc=kent@minoris.se \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ramona.bolboaca@analog.com \
    --cc=robh+dt@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 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.