First patch adds device tree support to lis3lv02d_i2c driver and
second patch adds platform data for lis331dlh driver to am335x
EVM. These patches were tested on AM335x-EVM.
AnilKumar Ch (2):
lis3: lis3lv02d_i2c: Add device tree support
ARM: dts: AM33XX: Add lis331dlh device tree data to am335x-evm
arch/arm/boot/dts/am335x-evm.dts | 42 ++++++++++++++++++++++++++++++++
drivers/misc/lis3lv02d/lis3lv02d_i2c.c | 13 ++++++++++
2 files changed, 55 insertions(+)
--
1.7.9.5
Add device tree matching table support to lis3lv02d_i2c driver. If
the driver data is passed from device tree, then this driver picks
up platform data from device node through common/generic lis3lv02d.c
driver.
Signed-off-by: AnilKumar Ch <redacted>
---
drivers/misc/lis3lv02d/lis3lv02d_i2c.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
Add lis331dlh device tree data to am335x-evm.dts. In AM335x EVM
lis331dlh accelerometer is connected to I2C2 bus. So this patch
change the status to "okay" to use I2C2 bus. Also added all the
required platform data to am335x-evm.
Signed-off-by: AnilKumar Ch <redacted>
---
arch/arm/boot/dts/am335x-evm.dts | 42 ++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
On Thursday 13 September 2012, AnilKumar Ch wrote:
quoted hunk
Add lis331dlh device tree data to am335x-evm.dts. In AM335x EVM
lis331dlh accelerometer is connected to I2C2 bus. So this patch
change the status to "okay" to use I2C2 bus. Also added all the
required platform data to am335x-evm.
Signed-off-by: AnilKumar Ch <redacted>
---
arch/arm/boot/dts/am335x-evm.dts | 42 ++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
and all the rest here? At least I would expect the "compatible" property
to be in the same place above.
Also, I think you should remove the "-i2c" postfix from the name, that
is already implied by the parent bus.
Hi Arnd,
Thanks for the review,
On Fri, Sep 14, 2012 at 13:56:06, Arnd Bergmann wrote:
On Thursday 13 September 2012, AnilKumar Ch wrote:
quoted
Add lis331dlh device tree data to am335x-evm.dts. In AM335x EVM
lis331dlh accelerometer is connected to I2C2 bus. So this patch
change the status to "okay" to use I2C2 bus. Also added all the
required platform data to am335x-evm.
Signed-off-by: AnilKumar Ch <redacted>
---
arch/arm/boot/dts/am335x-evm.dts | 42 ++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
and all the rest here? At least I would expect the "compatible" property
to be in the same place above.
This data is appended to above one, to make it readable I moved remaining
properties to here.
I don't follow how this is making things more readable.
Maybe a more logical way to do this would be use the existing i2c2 label
and write all the additions as
i2c2: {
status = "okay";
clock-frequency = <400000>;
lis331dlh at 18 {
compatible = "st,lis3lv02d";
reg = <0x18>;
vdd-supply = <&lis3_reg>;
vdd-io-supply = <&lis3_reg>;
...
};
quoted
Also, I think you should remove the "-i2c" postfix from the name, that
is already implied by the parent bus.
I will remove, but in case of spi the compatible name is lis3lv02d_spi.
By mistake I have uses "-i2c" instead of "_i2c".
The normal convention is to use '-', not '_', so that part was ok.
I think naming the other one lis3lv02d_spi was a mistake, it should
be named 'st,lis3lv02d' independent of the bus IMHO.