nded. This breaks if
caching is enabled and reg+1 happens to be a cacheable register.
Without regmap support refactoring a driver to enable regmap caching
requires separate i2c and spi paths. This is exactly what regmap is
supposed to help avoid.
Suggested-by: Jonathan Cameron
Signed-off-by: C
On 07/19/2016 01:22 PM, Mark Brown wrote:
> On Wed, Jul 13, 2016 at 02:53:42PM +0300, Crestez Dan Leonard wrote:
>> When using devicetree spi_device.modalias is set to the compatible
>> string with the vendor prefix removed. For SPI devices described via
>> ACPI the i2c_boar
When using devicetree stuff like i2c_client.name or spi_device.modalias
is initialized to the first DT compatible id with the vendor prefix
stripped. Since some drivers rely on this try to replicate it when using
ACPI with DT ids.
Signed-off-by: Crestez Dan Leonard
---
drivers/acpi/bus.c
;.
If the of_compatible property is present try to use that instead. This
makes it easier to instantiate i2c drivers through ACPI with DT ids.
Signed-off-by: Crestez Dan Leonard
---
drivers/i2c/i2c-core.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/i2c-core.c b/d
rlays got it.
* Change acpi_of_modalias outlen param to size_t
* Use {} after else
Crestez Dan Leonard (3):
acpi: Export acpi_of_modalias equiv of of_modalias_node
acpi i2c: Initialize info.type from of_compatible
acpi spi: Initialize modalias from of_compatible
drivers/acpi/bus.c |
;.
Change acpi_register_spi_device to use the of_compatible property if
present. This makes it easier to instantiate spi drivers through ACPI
with DT ids.
Signed-off-by: Crestez Dan Leonard
---
drivers/spi/spi.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/s
Since duplicate trigger names are supposed to cause errors at probe time
anyway this issue is unlikely to affect anyone.
Fixes commit 2e2b6a13f5f5119c36551c1ab99b85e0ad1a2105:
iio: Refuse to register triggers with duplicate names
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/industrialio
On 06/21/2016 09:42 PM, Mark Brown wrote:
> On Thu, Jun 16, 2016 at 06:24:36PM +0300, Crestez Dan Leonard wrote:
>
>> +val = ((u8*)val) + read_len;
>
> This cast looks broken, you should be able to do pointer arithmetic on
> void pointers as though they we
On 06/19/2016 02:57 PM, Jonathan Cameron wrote:
> On 17/06/16 12:10, Crestez Dan Leonard wrote:
>> From: Peter Meerwald
>>
>> The si114x supports x=1,2,3 IR LEDs for proximity sensing together with
>> visible and IR ambient light sensing (ALS).
>>
>> Newer
On 06/16/2016 11:11 AM, Mika Westerberg wrote:
> On Wed, Jun 15, 2016 at 09:30:28PM +0300, Crestez Dan Leonard wrote:
>> When using devicetree i2c_board_info.type is set to the compatible
>> string with the vendor prefix removed. For I2C devices described via
>> ACPI the i2c_b
er 0x1a as 'reserved'. It might make sense to just return a
constant on these models.
This was tested on si1143 and si1145
Link to v2: https://www.spinics.net/lists/linux-iio/msg25055.html
Signed-off-by: Peter Meerwald
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/light/Kconfi
On 06/16/2016 06:43 PM, Geert Uytterhoeven wrote:
> Hi Leonard,
>
> On Thu, Jun 16, 2016 at 5:24 PM, Crestez Dan Leonard
> wrote:
>> The regmap API usually assumes that bulk read operations will read a
>> range of registers but some I2C/SPI devices have certain registe
happens to be a cacheable register.
Without regmap support refactoring a driver to enable regmap caching
requires separate I2C and SPI paths. This is exactly what regmap is
supposed to help avoid.
Suggested-by: Jonathan Cameron
Signed-off-by: Crestez Dan Leonard
---
This works as expected for mpu6050
;.
Change acpi_register_spi_device to use the of_compatible property if
present. This makes it easier to instantiate spi drivers through ACPI
with DT ids.
Signed-off-by: Crestez Dan Leonard
---
drivers/spi/spi.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi.c
;.
If the of_compatible property is present try to use that instead. This
makes it easier to instantiate i2c drivers through ACPI with DT ids.
Signed-off-by: Crestez Dan Leonard
---
drivers/i2c/i2c-core.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/i2c-core.c b/d
When using devicetree stuff like i2c_client.name or spi_device.modalias
is initialized to the first DT compatible id with the vendor prefix
stripped. Since some drivers rely on this try to replicate it when using
ACPI with DT ids.
Signed-off-by: Crestez Dan Leonard
---
drivers/acpi/bus.c
patible", "st,lis3dh"},
}
})
}
The driver for that device supports tens of models is not aware of ACPI.
Like to prev thread: https://www.spinics.net/lists/linux-acpi/msg66469.html
Like to acpi overlays: https://www.spinics.net/lists/linux-acpi/msg66638.html
Crestez
On 06/10/2016 09:32 AM, Mika Westerberg wrote:
> On Thu, Jun 09, 2016 at 04:06:03PM +0300, Crestez Dan Leonard wrote:
>> When devices are instatiated through devicetree the i2c_client->name is
>> set to the compatible string with company name stripped out. This is
>
On 06/10/2016 10:04 AM, Wolfram Sang wrote:
> On Thu, Jun 09, 2016 at 04:06:03PM +0300, Crestez Dan Leonard wrote:
>> When devices are instatiated through devicetree the i2c_client->name is
>> set to the compatible string with company name stripped out. This is
>> then matc
ate between model numbers.
When using ACPI this id parameter is NULL and the driver usually needs
to do ACPI-specific differentiation.
This patch attempts to find a valid i2c_device_id when using ACPI with
DT-like compatible strings.
Signed-off-by: Crestez Dan Leonard
---
drivers/i2c/i2c-core.c |
This can be used by device drivers as the equivalent of of_match_device
when they are instantiated through ACPI using devicetree IDs. This is
described in Documentation/acpi/enumeration.txt
Signed-off-by: Crestez Dan Leonard
---
drivers/acpi/bus.c | 13 +++--
include/linux/acpi.h | 8
ch_device will have the same signature as of_match_device.
The purpose of these changes would be to make more drivers easier to
instantiate through ACPI firmware.
v2 fixes the code to actually work correctly. Hopefully the patches will also
be sent to the correct addresses this time.
Crestez Dan
ch_device will have the same signature as of_match_device.
The purpose of these changes would be to make more drivers easier to
instantiate through ACPI firmware. It's possible that I misunderstood and this
problem already has a different solution.
Crestez Dan Leonard (2):
acpi: Expose
This can be used by device drivers as the equivalent of of_match_device
when they are instantiated through ACPI using devicetree IDs. This is
described in Documentation/acpi/enumeration.txt
Signed-off-by: Crestez Dan Leonard
---
drivers/acpi/bus.c | 13 +++--
include/linux/acpi.h | 8
ate between model numbers.
When using ACPI this id parameter is NULL and the driver usually needs
to do ACPI-specific differentiation.
This patch attempts to find a valid i2c_device_id when using ACPI with
DT-like compatible strings.
Signed-off-by: Crestez Dan Leonard
---
drivers/i2c/i2c-core.c |
Initialize trig_num to -1 and handle trig_num=0 as a valid id.
Fixes: 7c7e9dad (iio: iio_generic_buffer: Add --trigger-num option)
Signed-off-by: Crestez Dan Leonard
---
tools/iio/iio_generic_buffer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/iio
On 05/30/2016 06:19 PM, Crestez Dan Leonard wrote:
> This patch series adds support for selecting iio devices/triggers by numeric
> id
> rather than just name. This is useful because the names are not actually
> guaranteed to be unique.
>
> Changes since v3:
> * Rebase o
In some cases this can result in incorrectly returning a negative value
from asus_acpi_get_sensor_info and the AK8963 magnetometer failing to
show up.
Cc: Srinivas Pandruvada
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 5 +++--
1 file changed, 3
On 05/31/2016 12:42 AM, Jonathan Cameron wrote:
> On 30 May 2016 14:44:41 BST, Crestez Dan Leonard
> wrote:
>> On 05/29/2016 06:47 PM, Jonathan Cameron wrote:
>>> On 18/05/16 16:00, Crestez Dan Leonard wrote:
>>>> Right now it is possible to only enable s
From: Peter Meerwald
The si114x supports x=1,2,3 IR LEDs for proximity sensing together with
visible and IR ambient light sensing (ALS).
Newer parts (si1132, si1145/6/7) can measure UV light and compute an UV index
Signed-off-by: Peter Meerwald
Signed-off-by: Crestez Dan Leonard
---
Changes
can
all be done under a single error label.
Signed-off-by: Crestez Dan Leonard
---
tools/iio/iio_generic_buffer.c | 172 ++---
1 file changed, 108 insertions(+), 64 deletions(-)
diff --git a/tools/iio/iio_generic_buffer.c b/tools/iio/iio_generic_buffer.c
in
This makes it possible to distinguish between iio devices with the same
name.
Signed-off-by: Crestez Dan Leonard
---
tools/iio/iio_generic_buffer.c | 69 +++---
1 file changed, 51 insertions(+), 18 deletions(-)
diff --git a/tools/iio/iio_generic_buffer.c b
Signed-off-by: Crestez Dan Leonard
---
tools/iio/iio_generic_buffer.c | 36 ++--
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/tools/iio/iio_generic_buffer.c b/tools/iio/iio_generic_buffer.c
index 3f16e9f..0e8a1f7 100644
--- a/tools/iio
and check if >= 0
for valid id.
Jonathan: you replied to v3 saying that they were applied but I don't see those
patches on any branch from your repo:
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
Crestez Dan Leonard (3):
iio: generic_buffer: Cleanup when receiving
On 05/29/2016 06:47 PM, Jonathan Cameron wrote:
> On 18/05/16 16:00, Crestez Dan Leonard wrote:
>> Right now it is possible to only enable some of the x/y/z channels, for
>> example you can enable accel_z without x or y but if you actually do
>> that what you get is actual
On 05/29/2016 10:48 PM, Jonathan Cameron wrote:
> On 23/05/16 19:40, Crestez Dan Leonard wrote:
>> The trigger name is documented as unique but drivers are currently
>> allowed to register triggers with duplicate names. This should be
>> considered a bug since it makes
ensors/Pages/HID-USB-to-IR-Reference-Design.aspx
>
> Signed-off-by: Peter Meerwald
> ---
> This is the code I am currently working on, partly tested. I've stripped some
> features from earlier versions and added support for newer chips.
> I hope this is useful to Crestez Dan L
On 05/24/2016 02:40 PM, Linus Walleij wrote:
> On Fri, May 13, 2016 at 8:43 PM, Crestez Dan Leonard
> wrote:
>
>> As far as I can tell DRDY for ST sensors behaves as a level rather than
>> edge interrupt. Registering for IRQF_TRIGGER_RISING instead of
>> IRQF_TRIGG
On 05/24/2016 02:27 PM, Linus Walleij wrote:
> On Fri, May 13, 2016 at 8:43 PM, Crestez Dan Leonard
> wrote:
>
>> This fixes a possible race where an interrupt arrives before complete
>> initialization and crashes because iio_trigger_get_drvdata returns NULL.
>>
This allows controlling the current trigger by numeric ID rather than
name.
Signed-off-by: Crestez Dan Leonard
---
Documentation/ABI/testing/sysfs-bus-iio | 9 +++
Documentation/DocBook/iio.tmpl | 4 +-
drivers/iio/industrialio-trigger.c | 115
The trigger name is documented as unique but drivers are currently
allowed to register triggers with duplicate names. This should be
considered a bug since it makes the 'current_trigger' interface
unusable.
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/industrialio-trig
Signed-off-by: Crestez Dan Leonard
---
tools/iio/generic_buffer.c | 34 +-
1 file changed, 29 insertions(+), 5 deletions(-)
diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer.c
index 3f16e9f..e8c3052 100644
--- a/tools/iio/generic_buffer.c
+++ b
sede
the v2 I posted earlier:
https://www.spinics.net/lists/linux-iio/msg24867.html
Crestez Dan Leonard (7):
iio: generic_buffer: Cleanup when receiving signals
iio: generic_buffer: Add --device-num option
iio: generic_buffer: Add --trigger-num option
iio: Add current_trigger_id alternativ
This changes the format of trigger names for some drivers so that the
result always includes indio_dev->id and is thus unique.
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/adc/max1027.c | 4 ++--
drivers/iio/common/st_sensors/st_sensors_trigger.c | 2 +-
driv
can
all be done under a single error label.
Signed-off-by: Crestez Dan Leonard
---
Changes since v2: Initialize data to NULL to prevent crash on free.
tools/iio/generic_buffer.c | 172 -
1 file changed, 108 insertions(+), 64 deletions(-)
diff --git a/to
This makes it possible to distinguish between iio devices with the same
name.
Signed-off-by: Crestez Dan Leonard
---
tools/iio/generic_buffer.c | 69 ++
1 file changed, 51 insertions(+), 18 deletions(-)
diff --git a/tools/iio/generic_buffer.c b/tools
This is a preferred alternative to 'current_trigger'.
Signed-off-by: Crestez Dan Leonard
---
tools/iio/generic_buffer.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer.c
index e8c3052..b23371a 100644
-
On 05/21/2016 07:28 PM, Jonathan Cameron wrote:
> On 20/05/16 16:55, Peter Meerwald-Stadler wrote:
>>
>>> This also drops all the code freeing string buffers at the end of main.
>>> Memory is freed when the process exits anyway so there's no point in
>>> cluttering the code with all those gotos.
>>
This makes it possible to distinguish between iio devices with the same
name.
Signed-off-by: Crestez Dan Leonard
---
tools/iio/generic_buffer.c | 69 ++
1 file changed, 51 insertions(+), 18 deletions(-)
diff --git a/tools/iio/generic_buffer.c b/tools
can
all be done under a single error label.
Signed-off-by: Crestez Dan Leonard
---
tools/iio/generic_buffer.c | 170 -
1 file changed, 107 insertions(+), 63 deletions(-)
diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer.c
index 2429
This makes it possible to distinguish between iio devices with the same
name.
Signed-off-by: Crestez Dan Leonard
---
tools/iio/generic_buffer.c | 53 ++
1 file changed, 40 insertions(+), 13 deletions(-)
diff --git a/tools/iio/generic_buffer.c b/tools
x27;s no point in
cluttering the code with all those gotos.
Signed-off-by: Crestez Dan Leonard
---
tools/iio/generic_buffer.c | 162 -
1 file changed, 88 insertions(+), 74 deletions(-)
diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer
y: Crestez Dan Leonard
---
drivers/iio/light/max44000.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/light/max44000.c b/drivers/iio/light/max44000.c
index e01e58a..f17cb2e 100644
--- a/drivers/iio/light/max44000.c
+++ b/drivers/iio/light/max44000.c
@@ -147,7 +147,6 @@ static co
On 05/20/2016 09:39 AM, Peter Rosin wrote:
> On 2016-05-20 04:34, Matt Ranostay wrote:
>> On Wed, May 18, 2016 at 8:00 AM, Crestez Dan Leonard
>> wrote:
>>> Signed-off-by: Crestez Dan Leonard
>>> ---
>>> drive
affordable reference design (via Digikey), see
http://www.silabs.com/products/sensors/Pages/HID-USB-to-IR-Reference-Design.aspx
Signed-off-by: Peter Meerwald
Signed-off-by: Crestez Dan Leonard
---
This is based on an old driver by Peter which was posted for review but not
actually submitted. I
implemented by this patch.
This I2C master mode also works when the MPU itself is connected via
SPI.
I2C master supports up to 5 slaves. Slaves 0-3 have a common operating
mode while slave 4 is different. This patch implements an i2c adapter
using slave 4.
Signed-off-by: Crestez Dan Leonard
: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 8 +++
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 107 -
2 files changed, 112 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h
b/drivers/iio/imu/inv_mpu6050
it to configure stuff like sample
rates and scaling factors.
Buffer values are read from the MPU fifo, allowing a much higher
sampling rate.
Signed-off-by: Crestez Dan Leonard
---
.../devicetree/bindings/iio/imu/inv_mpu6050.txt| 47 ++-
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
registers
For external channels support:
* Only enable i2c slaves when required
* Also forward write_raw for external channels
* Drop handling read_raw from EXT_SENS registers
* List external channels by scan index
* Allow external channels with arbitrary sizes
Crestez Dan Leonard (7):
iio:
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 2 ++
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c| 9 ++---
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 4 +++-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/imu
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c| 13 -
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 3 ++-
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
b/drivers/iio/imu
Using regmap_read_bulk is wrong because it assumes that a range of
registers is being read. In our case reading from the fifo register will
return multiple values but this is *not* auto-increment.
This currently works by accident.
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 47 ++
drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 5
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 1 +
drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 5
4 files changed
Walleij
Cc: Giuseppe Barba
Cc: Denis Ciocca
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/common/st_sensors/st_sensors_core.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c
b/drivers/iio/common/st_sensors/st_sensors_core.c
index 928ee68
This fixes a possible race where an interrupt arrives before complete
initialization and crashes because iio_trigger_get_drvdata returns NULL.
Cc: Linus Walleij
Cc: Giuseppe Barba
Cc: Denis Ciocca
Signed-off-by: Crestez Dan Leonard
---
I ran into this while breaking the driver. But since the
Linus Walleij
Cc: Giuseppe Barba
Cc: Denis Ciocca
Signed-off-by: Crestez Dan Leonard
---
This is an alternative fix to this patch:
https://www.spinics.net/lists/linux-iio/msg24722.html
[PATCH 2/2 v6] iio: st_sensors: read surplus samples in trigger.
It's not clear if all st_sensors b
On 05/01/2016 08:27 PM, Jonathan Cameron wrote:
> On 29/04/16 20:02, Crestez Dan Leonard wrote:
>> --- a/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt
>> +++ b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt
>> @@ -1,16 +1,27 @@
>> InvenSe
On 05/04/2016 12:01 PM, Jonathan Cameron wrote:
> On 03/05/16 14:01, Crestez Dan Leonard wrote:
>> On 05/01/2016 08:34 PM, Jonathan Cameron wrote:
>>> On 29/04/16 20:02, Crestez Dan Leonard wrote:
>>>> Right now it is possible to only enable some of the x/y/z chan
On 05/01/2016 10:58 PM, Jonathan Cameron wrote:
> On 27/04/16 16:56, One Thousand Gnomes wrote:
>> On Tue, 26 Apr 2016 18:07:55 -0500
>> Michael Welling wrote:
>>
>>> On Tue, Apr 26, 2016 at 11:26:51PM +0100, One Thousand Gnomes wrote:
This now causes us to crash and burn on the ASUS T10
On 05/01/2016 08:34 PM, Jonathan Cameron wrote:
> On 29/04/16 20:02, Crestez Dan Leonard wrote:
>> Right now it is possible to only enable some of the x/y/z channels, for
>> example you can enable accel_z without x or y. If you actually do that
>> what you get is actual
triggered buffers a failure to
enable the trigger used to make the buffer unusable.
Signed-off-by: Crestez Dan Leonard
---
Previous version was sent as a RFC. This version also properly handles errors
from iio_trigger_get_irq and request_threaded_irq.
Calling request_threaded_irq with a negative/i
On 05/01/2016 10:11 PM, Jonathan Cameron wrote:
> On 28/04/16 17:40, Crestez Dan Leonard wrote:
>> When attaching a pollfunc iio_trigger_attach_poll_func will allocate a
>> virtual irq and call the driver's set_trigger_state function. Fix error
>> handling to release th
On 05/02/2016 06:23 PM, Mark Brown wrote:
> On Sun, May 01, 2016 at 06:04:08PM +0100, Jonathan Cameron wrote:
>
>> If you were to break these registers up into regmap fields it might solve
>> this.. Regmap writes always go through whatever - whether they match the
>> existing state of the cache
the fastest available transfer method.
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/magnetometer/ak8975.c | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/iio/magnetometer/ak8975.c
b/drivers/iio/magnetometer/ak8975.c
index dbf0661..c24b8a5
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 47 ++
drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 5
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 1 +
drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 5
4 files changed
erly support driver-specified channel offsets instead of
implicit iio rules.
Patches 1,2,3,4 and 6 are required cleanups/fixed to make the rest work. They
could go in separately.
Crestez Dan Leonard (7):
iio: inv_mpu6050: Do burst reads using spi/i2c directly
iio: inv_mpu6050: Initial
selectively enable x/y/z
accel by unpacking the data read from the hardware into a format the iio
core accepts.
It is easier to simply refuse incorrect configuration.
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 2 +-
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c| 13 -
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 3 ++-
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
b/drivers/iio/imu
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 2 ++
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c| 9 ++---
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 4 +++-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/imu
This works by copying their channels at probe time.
Signed-off-by: Crestez Dan Leonard
---
.../devicetree/bindings/iio/imu/inv_mpu6050.txt| 37 +-
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 420 -
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 63
interface and it has an
interrupt that signals when data from slave to master arrived.
Signed-off-by: Crestez Dan Leonard
---
.../devicetree/bindings/iio/imu/inv_mpu6050.txt| 61 +-
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 239 -
drivers/iio/imu/inv_mpu6050
Using regmap_read_bulk is wrong because it assumes that a range of
registers is being read. In our case reading from the fifo register will
return multiple values but this is *not* auto-increment.
This currently works by accident.
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu
e then the buffer becomes unusable.
It is not possible to handle this sort of error by calling
iio_trigger_detach_poll_func externally somehow. That function should
only be called if attach is successful.
Signed-off-by: Crestez Dan Leonard
---
I ran into this while adding some validation i
On 04/27/2016 11:39 AM, Peter Rosin wrote:
> On 2016-04-23 23:32, Jonathan Cameron wrote:
>> On 20/04/16 18:17, Crestez Dan Leonard wrote:
>>> The MPU has an auxiliary I2C bus for connecting external
>>> sensors. This bus has two operating modes:
>>> * pass-thr
Using regmap_read_bulk is wrong because it assumes that a range of
registers is being read. In our case reading from the fifo register will return
multiple values but this is *not* auto-increment.
This currently works by accident.
Signed-off-by: Crestez Dan Leonard
---
There is a need to
On 04/26/2016 06:21 PM, Daniel Baluta wrote:
> On Tue, Apr 26, 2016 at 4:14 PM, Yong Li wrote:
>> I am thinking if there is any application is using this incorrect
>> name, the application should be fix too
>
> The rule is: "Don't break the userspace ABI". So, if we got this wrong
> from the begi
On 04/25/2016 10:33 PM, Jonathan Cameron wrote:
On 22/04/16 04:43, Yong Li wrote:
When load the driver using the below command:
echo tmp006 0x40 > /sys/bus/i2c/devices/i2c-0/new_device
In sysfs, the i2c name is tmp006, however the iio name is 0-0040,
they are inconsistent. With this patch,
the
On 04/24/2016 02:14 PM, Jonathan Cameron wrote:
> On 20/04/16 14:15, Crestez Dan Leonard wrote:
>> This can be used to distinguish mpu6500. This is a warning rather than
>> an error because the differences are mostly irrelevant and it's nice to
>> avoid breaking users wi
On 04/21/2016 04:56 PM, Peter Rosin wrote:
> Crestez Dan Leonard wrote:
>> On 04/20/2016 11:31 PM, Peter Rosin wrote:
>>> Crestez Dan Leonard wrote:
>>>> Changes since that version:
>>>> * Nest the adapter in inv_mpu6050_state instead of making it static
orrectly, which
> was evident from the crash in the mpu6050 driver (on a mpu9150 chip)
> reported
> by Crestez Dan Leonard. Also, it didn't make things all that much simpler
> anyway (even if used correctly).
> - Rename i2c_mux_core:adapters into i2c_mux_core:num_adapters.
On 04/20/2016 11:31 PM, Peter Rosin wrote:
> Crestez Dan Leonard wrote:
>> Changes since that version:
>> * Nest the adapter in inv_mpu6050_state instead of making it static
>> * Explicitly forward of_node "i2c-aux-master" to allow describing aux devices
>>
https://github.com/0day-ci/linux/commits/Crestez-Dan-Leonard/iio-inv_mpu6050-Add-support-for-auxiliary-I2C-master/20160421-012042
> base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
> config: i386-randconfig-i1-201616 (attached as .config)
> reproduce:
>
interface and it has an
interrupt that signals when data from slave to master arrived.
Signed-off-by: Crestez Dan Leonard
---
This is based on earlier work by Daniel Baluta :
https://www.spinics.net/lists/linux-iio/msg23573.html
Changes since that version:
* Nest the adapter in inv_mpu6050_state
This can be used to distinguish mpu6500. This is a warning rather than
an error because the differences are mostly irrelevant and it's nice to
avoid breaking users with slightly incorrect ACPI/DT.
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
happened to work so far because the differences between the
supported models are very minor.
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 15 ++-
drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 2 +-
drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 18
This field was unused and incorrect for mpu6500.
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 3 ---
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 2 --
2 files changed, 5 deletions(-)
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
b/drivers/iio
This device is a package containing a MPU6050-like sensor and an AK8975
magnetometer. The magnetometer component is supported by the existing
ak8975 driver.
This patch also rephrases the Kconfig descriptions.
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/Kconfig
Signed-off-by: Crestez Dan Leonard
---
drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c
b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c
index 3972a46..a0f8df2 100644
--- a/drivers/iio/imu/inv_mpu6050
This adds support for mpu9150 explictly. This device includes a MPU60X0 and
AK8975 inside the same package. It also cleans the chip_type <=> hw_info
mappings which were just a mess.
Crestez Dan Leonard (5):
iio: inv_mpu6050: Cleanup hw_info mapping
iio: inv_mpu6050:
On 04/03/2016 11:52 AM, Peter Rosin wrote:
> From: Peter Rosin
>
> Allocate an explicit i2c mux core to handle parent and child adapters
> etc. Update the select/deselect ops to be in terms of the i2c mux core
> instead of the child adapter.
>
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
>
1 - 100 of 141 matches
Mail list logo