-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ingrasys switch s9100 kernel patches (#19)
* Add ingrasys s9100 kernel config * Add PCA954x I2C force deselect on exit flag Signed-off-by: Wade He [email protected]
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
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 @@ | ||
Enable CONFIG_GPIO_PCA953X, CONFIG_I2C_GPIO | ||
|
||
From: wadelnn <[email protected]> | ||
|
||
--- | ||
debian/build/build_amd64_none_amd64/.config | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/debian/build/build_amd64_none_amd64/.config b/debian/build/build_amd64_none_amd64/.config | ||
index a57510b..6b6aea9 100644 | ||
--- a/debian/build/build_amd64_none_amd64/.config | ||
+++ b/debian/build/build_amd64_none_amd64/.config | ||
@@ -3190,7 +3190,7 @@ CONFIG_I2C_SCMI=m | ||
CONFIG_I2C_DESIGNWARE_CORE=m | ||
CONFIG_I2C_DESIGNWARE_PLATFORM=m | ||
CONFIG_I2C_DESIGNWARE_PCI=m | ||
-# CONFIG_I2C_GPIO is not set | ||
+CONFIG_I2C_GPIO=m | ||
CONFIG_I2C_KEMPLD=m | ||
CONFIG_I2C_OCORES=m | ||
CONFIG_I2C_PCA_PLATFORM=m | ||
@@ -3304,7 +3304,7 @@ CONFIG_GPIO_SCH=m | ||
# | ||
# CONFIG_GPIO_MAX7300 is not set | ||
# CONFIG_GPIO_MAX732X is not set | ||
-# CONFIG_GPIO_PCA953X is not set | ||
+CONFIG_GPIO_PCA953X=m | ||
# CONFIG_GPIO_PCF857X is not set | ||
# CONFIG_GPIO_ADP5588 is not set | ||
|
||
-- | ||
2.1.4 | ||
|
36 changes: 36 additions & 0 deletions
36
patch/driver-pca954x-i2c-mux-force-deselect-on-exit-flag.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,36 @@ | ||
Adding PCA9548 I2C MUX force deselect-on-exit flag. | ||
|
||
From: wadelnn <[email protected]> | ||
|
||
--- | ||
drivers/i2c/muxes/i2c-mux-pca954x.c | 7 ++++++- | ||
1 file changed, 6 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c | ||
index 9bd4212..2ed7758 100644 | ||
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c | ||
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c | ||
@@ -116,6 +116,11 @@ static const struct i2c_device_id pca954x_id[] = { | ||
}; | ||
MODULE_DEVICE_TABLE(i2c, pca954x_id); | ||
|
||
+/* Force deselect-on-exit feature for PCA954X devices. Default is disabled. */ | ||
+static unsigned int force_deselect_on_exit = 0; | ||
+module_param(force_deselect_on_exit, uint, S_IRUGO); | ||
+MODULE_PARM_DESC(force_deselect_on_exit, "Force deselect-on-exit feature for PCA954X devices. Default is disabled."); | ||
+ | ||
/* Write to mux register. Don't use i2c_transfer()/i2c_smbus_xfer() | ||
for this as they will try to lock adapter a second time */ | ||
static int pca954x_reg_write(struct i2c_adapter *adap, | ||
@@ -233,7 +238,7 @@ static int pca954x_probe(struct i2c_client *client, | ||
data->virt_adaps[num] = | ||
i2c_add_mux_adapter(adap, &client->dev, client, | ||
force, num, class, pca954x_select_chan, | ||
- (pdata && pdata->modes[num].deselect_on_exit) | ||
+ (pdata && pdata->modes[num].deselect_on_exit) || force_deselect_on_exit | ||
? pca954x_deselect_mux : NULL); | ||
|
||
if (data->virt_adaps[num] == NULL) { | ||
-- | ||
2.1.4 | ||
|
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