Skip to content

Commit

Permalink
Add ingrasys switch s9100 kernel patches (#19)
Browse files Browse the repository at this point in the history
* Add ingrasys s9100 kernel config
* Add PCA954x I2C force deselect on exit flag

Signed-off-by: Wade He [email protected]
  • Loading branch information
wadelnn authored and lguohan committed May 18, 2017
1 parent 73e99e9 commit 0d56999
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
33 changes: 33 additions & 0 deletions patch/config-ingrasys-s9100.patch
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 patch/driver-pca954x-i2c-mux-force-deselect-on-exit-flag.patch
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

2 changes: 2 additions & 0 deletions patch/series
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kernel-sched-core-fix-cgroup-fork-race.patch
config-dell-s6000.patch
config-mlnx-sn2700.patch
config-dell-z9100.patch
config-ingrasys-s9100.patch
driver-at24-fix-odd-length-two-byte-access.patch
driver-hwmon-max6620.patch
driver-hwmon-max6620-fix-rpm-calc.patch
Expand All @@ -17,6 +18,7 @@ driver-hwmon-pmbus-ucd9200-mlnx.patch
driver-arista-piix4-mux-patch.patch
driver-arista-net-tg3-dma-mask-4g-sb800.patch
driver-arista-net-tg3-access-regs-indirectly.patch
driver-pca954x-i2c-mux-force-deselect-on-exit-flag.patch
linux-3.19-mmc-sdhci-Add-a-quirk-for-AMD-SDHC-transfer-mode-reg.patch
linux-3.19-mmc-sdhci-pci-enable-the-clear-transfer-mode-registe.patch
linux-3.19-mmc-sdhci-pci-enable-sdhci-doesn-t-support-hs200-qui.patch

0 comments on commit 0d56999

Please sign in to comment.