linux/drivers/iio
Srinivas Pandruvada a35c5d1aa9 iio: imu: inv_mpu6050: Create mux clients for ACPI
This is a follow up patches after adding i2c mux adapter for bypass
mode. Potentially many different types of sensor can be attached to
INVMPU6XXX device, which can be connected to main cpu i2c bus in
bypass mode.
Why do we need this?
The system ACPI table entry will consist of only one device for
INV6XXX, assuming that this driver will handle all connected sensors.
That is not true for the Linux driver. There are bunch of IIO drivers
for each sensors, hence we created a mux on this device. So to load
these additional drivers, we need to create i2c devices for them
in this driver using this mux adapter.

There are multiple options:
1. Use the auto detect feature, this needs a new i2c class for the
adapter as the existing HWMON class is not acceptable. Also the
autodetect has overhead of executing detect method for each
matching class of adapters.
This is a simple implementation. This option was previously submitted
with not a happy feedback.

2. Option is use ACPI magic and parse the configuration data. What
we need to create a i2c device at a minimum is address and a name.
Address can be obtained for secondary device in more or less in a
standard way from using _CRS element. But there is no name. To get
name we need to process proprietary vendor data. Not having name is
not fun, as you have to create device using the device name of
INVN6XXXX, respecting driver duplicate name space restriction.
Also each client driver needs to have this name in the id table.
Since multiple driver can be loaded, the driver should be able to
detect its presence and gracefully exit for the other client driver
to take it over.
So we use two step process:
- Use DMI to id platform and parse propritery data. This is not uncommon
for many x86 platform specific driver. We will get both name and address.
The change created necessary infrastructure to add more properitery vendor
data parsing.
- If DMI match fails, then create device on INV6XXX-client (we can't
create with same name as INV6XXX as it will cause duplicate name and driver
model will reject.) With this each client sensor driver which needs to get
attached via INV6XXXX, need this name in the id table and detect the
physical presence of sensor in probe and exit if not found.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-25 12:02:59 +00:00
..
accel iio: improve usage of gpiod API 2015-02-22 09:49:22 +00:00
adc iio: vf610_adc: cleanup wait_for_completion return handling 2015-02-04 17:00:33 +00:00
amplifiers iio: amplifiers: ad8366: Use right order for type specification 2015-01-01 12:16:57 +00:00
common iio:common:ssp_sensors fix warnings due to 32 bit instead of 64 bit passed to do_div 2015-01-31 09:41:14 +00:00
dac iio: add support of the max5821 2014-07-27 14:21:35 +01:00
frequency iio: frequency: ad9523: Increase sleep time in ad9523_store_eeprom 2015-01-01 12:18:26 +00:00
gyro iio: improve usage of gpiod API 2015-02-22 09:49:22 +00:00
humidity iio:humidity:si7020: fix pointer to i2c client 2014-10-25 20:55:56 +01:00
imu iio: imu: inv_mpu6050: Create mux clients for ACPI 2015-02-25 12:02:59 +00:00
light iio: jsa1212: Constify struct regmap_config 2015-02-25 11:37:53 +00:00
magnetometer iio: magnetometer: ak8975: Add AK8963 2015-01-27 18:49:59 +00:00
orientation iio: hid-sensor-incl-3d: Introduce PM 2015-01-25 22:55:56 +00:00
pressure iio: hid-sensor-press: Introduce PM 2015-01-25 22:56:00 +00:00
proximity iio: improve usage of gpiod API 2015-02-22 09:49:22 +00:00
temperature iio: Add Melexis mlx90614 contact-less infrared temperature sensor driver 2014-05-03 11:38:13 +01:00
trigger iio: trigger: Add a blank line after declarations 2014-12-26 12:15:36 +00:00
buffer_cb.c iio get rid of unneccessary error_ret 2014-02-18 08:46:36 +00:00
iio_core_trigger.h iio: fix semicolon in io_core_trigger.h 2013-08-03 18:40:32 +01:00
iio_core.h iio: Move buffer registration to the core 2014-12-12 12:28:31 +00:00
industrialio-buffer.c iio: buffer: refactor buffer attributes setup 2015-02-04 18:46:29 +00:00
industrialio-core.c iio: core: Introduce IIO_CHAN_INFO_DEBOUNCE_COUNT and _TIME 2015-01-29 18:49:57 +00:00
industrialio-event.c iio: core: Remove IIO_EV_TYPE_INSTANCE 2015-01-27 18:49:55 +00:00
industrialio-trigger.c iio: Remove timestamp argument from iio_trigger_poll() and iio_trigger_poll_chained() 2014-06-14 16:25:59 +01:00
industrialio-triggered-buffer.c iio: kfifo: Remove unused argument in iio_kfifo_allocate 2014-12-26 11:20:38 +00:00
inkern.c First round of IIO new drivers, cleanups and functionality for the 3.20 cycle take 2 2015-01-21 10:13:37 +08:00
Kconfig iio: Deselect IIO_TRIGGER for IIO_KFIFO_BUF 2015-01-25 22:53:35 +00:00
kfifo_buf.c iio: kfifo: Add resource management devm_iio_kfifo_allocate/free 2014-12-26 11:39:57 +00:00
Makefile iio: Add AS3935 lightning sensor support 2014-03-16 18:00:32 +00:00