From: Nikolaus Voss <nikolaus.voss@loewensteinmedical.de>
To: Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Xiongfeng Wang <xiongfeng.wang@linaro.org>,
Javier Martinez Canillas <javier@dowhile0.org>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/2] IIO: st_sensors_i2c: improve device enumeration
Date: Wed, 4 Jul 2018 15:27:06 +0200 [thread overview]
Message-ID: <cover.1530710826.git.nikolaus.voss@loewensteinmedical.de> (raw)
When trying to instantiate a st_accel_i2c device from an ACPI based
system, I ran into some problems:
For my device, there is no ACPI match table entry, so rather than
creating /allocating a new ACPI HID for the device, I wanted to use an
existing DT table compatible entry via creating an ACPI_DT_NAMESPACE_HID
/PRP0001 HID ACPI entry (see Documentation/acpi/enumeration.txt).
This did not work because st_accel_i2c.c bails out if there is a ACPI
node but no ACPI table match. Use device_get_match_data API to get the
right driver data.
acpi_device_get_match_data() currently doesn't return DT compatible
matches. A separate patch is submitted to fix this.
v3:
- remove unused i2c_device_id .driver_data fields as suggested by
Javier Martinez Canillas.
v2:
- use device_get_match_data API as suggested by Andy Shevchenko
- removed syncing DT/I2C table names as Jonathan Cameron pointed out
this would be an ABI change
- converting from probe() to probe_new() is moved into a separate
patch (as suggested by Jonathan Cameron)
Nikolaus Voss (2):
IIO: st_accel_i2c.c: Simplify access to driver data
IIO: st_accel_i2c.c: Use probe_new() instead of probe()
drivers/iio/accel/st_accel_i2c.c | 61 ++++++++++++++------------------
1 file changed, 26 insertions(+), 35 deletions(-)
--
2.17.1
next reply other threads:[~2018-07-04 13:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 13:27 Nikolaus Voss [this message]
2018-07-03 5:41 ` [PATCH v3 1/2] IIO: st_accel_i2c.c: Simplify access to driver data Nikolaus Voss
2018-07-04 16:10 ` Andy Shevchenko
2018-07-05 9:30 ` Nikolaus Voss
2018-07-03 6:06 ` [PATCH v3 2/2] IIO: st_accel_i2c.c: Use probe_new() instead of probe() Nikolaus Voss
2018-07-04 16:15 ` 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=cover.1530710826.git.nikolaus.voss@loewensteinmedical.de \
--to=nikolaus.voss@loewensteinmedical.de \
--cc=javier@dowhile0.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=pmeerw@pmeerw.net \
--cc=xiongfeng.wang@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
all inboxes | Powered by JetHome®