From: Mehdi Djait <mehdi.djait.k@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: jic23@kernel.org, mazziesaccount@gmail.com,
krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org,
lars@metafoo.de, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5 5/7] iio: accel: kionix-kx022a: Refactor driver and add chip_info structure
Date: Mon, 12 Jun 2023 18:31:54 +0200 [thread overview]
Message-ID: <ZIdIev+evQUvX5Rg@carbian> (raw)
In-Reply-To: <ZIc/uvB1zxNRnuRS@smile.fi.intel.com>
Hello Andy,
On Mon, Jun 12, 2023 at 06:54:34PM +0300, Andy Shevchenko wrote:
> On Mon, Jun 12, 2023 at 04:22:08PM +0200, Mehdi Djait wrote:
> > Add the chip_info structure to the driver's private data to hold all
> > the device specific infos.
> > Refactor the kx022a driver implementation to make it more generic and
> > extensible.
>
> ...
>
> > + chip_info = spi_get_device_match_data(spi);
>
> Missing check. You addressed only I²C case. Is there any explanation?
I will add the check for the SPI case
>
> ...
>
> > struct kx022a_data {
> > + const struct kx022a_chip_info *chip_info;
> > struct regmap *regmap;
>
> I would suggest to run bloat-o-meter with this version and if you place
> chip_info after regmap. Does it gain us some memory?
I used the bloat-o-meter on the two .ko files (this version and the the
one where chip_info after regamp) Is this what you asked for ?
add/remove: 0/0 grow/shrink: 0/5 up/down: 0/-20 (-20)
Function old new delta
kx132_get_fifo_bytes 148 144 -4
kx022a_trigger_set_state 352 348 -4
kx022a_read_raw 380 376 -4
kx022a_buffer_predisable 248 244 -4
kx022a_buffer_postenable 296 292 -4
Total: Before=11244, After=11224, chg -0.18%
--
Kind Regards
Mehdi Djait
next prev parent reply other threads:[~2023-06-12 16:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 14:22 [PATCH v5 0/7] iio: accel: Add support for Kionix/ROHM KX132-1211 accelerometer Mehdi Djait
2023-06-12 14:22 ` [PATCH v5 1/7] dt-bindings: iio: Add " Mehdi Djait
2023-06-12 14:22 ` [PATCH v5 2/7] iio: accel: kionix-kx022a: Remove blank lines Mehdi Djait
2023-06-12 14:22 ` [PATCH v5 3/7] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility Mehdi Djait
2023-06-12 14:22 ` [PATCH v5 4/7] iio: accel: kionix-kx022a: Add an i2c_device_id table Mehdi Djait
2023-06-12 14:22 ` [PATCH v5 5/7] iio: accel: kionix-kx022a: Refactor driver and add chip_info structure Mehdi Djait
2023-06-12 15:54 ` Andy Shevchenko
2023-06-12 16:31 ` Mehdi Djait [this message]
2023-06-12 17:13 ` Andy Shevchenko
2023-06-12 17:35 ` Mehdi Djait
2023-06-12 14:22 ` [PATCH v5 6/7] iio: accel: kionix-kx022a: Add a function to retrieve number of bytes in buffer Mehdi Djait
2023-06-12 15:55 ` Andy Shevchenko
2023-06-12 14:22 ` [PATCH v5 7/7] iio: accel: Add support for Kionix/ROHM KX132-1211 accelerometer Mehdi Djait
2023-06-12 15:58 ` Andy Shevchenko
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=ZIdIev+evQUvX5Rg@carbian \
--to=mehdi.djait.k@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mazziesaccount@gmail.com \
--cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).