This repository has been archived by the owner on Apr 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta-ostro-bsp: fix the incorrect device name for IIO device SI7020
When load the driver using the below command: echo si7020 0x40 > /sys/bus/i2c/devices/i2c-0/new_device In sysfs, the i2c name is si7020, however the iio name is 0-0040, they are inconsistent. With this patch, the iio name will be the same as the i2c device name Fixes: IOTOS-1585 Upstream-Status:Pending (From meta-ostro-bsp rev: ba74bc7f6dcea766460291f4539452522a0d9e2d) Signed-off-by: Yong Li <[email protected]>
- Loading branch information
1 parent
7420b03
commit fb66abb
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...tro-bsp/recipes-kernel/linux-yocto/linux-yocto/0001-iio-si7020-Set-correct-iio-name.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From 28496a47d0338dc91fb34037332b2d43dce10715 Mon Sep 17 00:00:00 2001 | ||
From: Yong Li <[email protected]> | ||
Date: Fri, 29 Apr 2016 14:46:57 +0800 | ||
Subject: [PATCH] iio: si7020: Set correct iio name | ||
|
||
When load the driver using the below command: | ||
echo si7020 0x40 > /sys/bus/i2c/devices/i2c-0/new_device | ||
|
||
In sysfs, the i2c name is si7020, however the iio name is 0-0040, | ||
they are inconsistent. With this patch, | ||
the iio name will be the same as the i2c device name | ||
|
||
Signed-off-by: Yong Li <[email protected]> | ||
--- | ||
drivers/iio/humidity/si7020.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/drivers/iio/humidity/si7020.c b/drivers/iio/humidity/si7020.c | ||
index ffc2ccf..a3968db 100644 | ||
--- a/drivers/iio/humidity/si7020.c | ||
+++ b/drivers/iio/humidity/si7020.c | ||
@@ -138,7 +138,7 @@ static int si7020_probe(struct i2c_client *client, | ||
*data = client; | ||
|
||
indio_dev->dev.parent = &client->dev; | ||
- indio_dev->name = dev_name(&client->dev); | ||
+ indio_dev->name = id->name; | ||
indio_dev->modes = INDIO_DIRECT_MODE; | ||
indio_dev->info = &si7020_info; | ||
indio_dev->channels = si7020_channels; | ||
-- | ||
2.5.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters