Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Cavium as7512-32x related kernel driver patches #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ This repository contains the scripts and patches to build the kernel for SONiC.

Usage:

./build.sh
./build.sh [vendor_path]

4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

PATCH_FILE_PATH=$1

# Obtaining the Debian kernel source
wget https://launchpad.net/debian/+archive/primary/+files/linux_3.16.7-ckt11-1+deb8u3.dsc
wget https://launchpad.net/debian/+archive/primary/+files/linux_3.16.7-ckt11.orig.tar.xz
Expand All @@ -23,7 +25,7 @@ git add .
git add debian/build/build_amd64_none_amd64/.config -f
git commit -m "unmodified debian source"
stg init
stg import -s ../patch/series
stg import -s ../patch/$PATCH_FILE_PATH/series

# Building a custom kernel from Debian kernel source
fakeroot make -f debian/rules.gen binary-arch_amd64_none
71 changes: 71 additions & 0 deletions patch/cavm-as7512/config-accton-as7512_32x.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

accton driver config, i2c_mux_pca954x and pmbus.
From: roy_lee <roy_lee@accton.com>

---
debian/build/build_amd64_none_amd64/.config | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/debian/build/build_amd64_none_amd64/.config b/debian/build/build_amd64_none_amd64/.config
index c0b11a1..df010e7 100644
--- a/debian/build/build_amd64_none_amd64/.config
+++ b/debian/build/build_amd64_none_amd64/.config
@@ -1788,6 +1788,8 @@ CONFIG_EEPROM_LEGACY=m
CONFIG_EEPROM_MAX6875=m
CONFIG_EEPROM_93CX6=m
# CONFIG_EEPROM_93XX46 is not set
+CONFIG_EEPROM_ACCTON_AS7512_32x_SFP=m
+CONFIG_EEPROM_SFF_8436=m
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONFIG_CB710_CORE=m
# CONFIG_CB710_DEBUG is not set
CONFIG_CB710_DEBUG_ASSUMPTIONS=y
@@ -3146,7 +3148,7 @@ CONFIG_I2C_MUX=m
#
# CONFIG_I2C_MUX_GPIO is not set
# CONFIG_I2C_MUX_PCA9541 is not set
-# CONFIG_I2C_MUX_PCA954x is not set
+CONFIG_I2C_MUX_PCA954x=m
# CONFIG_I2C_MUX_PINCTRL is not set
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_SMBUS=m
@@ -3397,6 +3399,10 @@ CONFIG_HWMON_VID=m
#
CONFIG_SENSORS_ABITUGURU=m
CONFIG_SENSORS_ABITUGURU3=m
+CONFIG_SENSORS_ACCTON_I2C_CPLD=m
+CONFIG_SENSORS_ACCTON_AS7512_32x_FAN=m
+CONFIG_SENSORS_ACCTON_AS7512_32x_PSU=m
+CONFIG_SENSORS_YM2651Y=m
# CONFIG_SENSORS_AD7314 is not set
CONFIG_SENSORS_AD7414=m
CONFIG_SENSORS_AD7418=m
@@ -3480,7 +3486,18 @@ CONFIG_SENSORS_NTC_THERMISTOR=m
CONFIG_SENSORS_NCT6683=m
CONFIG_SENSORS_NCT6775=m
CONFIG_SENSORS_PCF8591=m
-# CONFIG_PMBUS is not set
+CONFIG_PMBUS=m
+CONFIG_SENSORS_PMBUS=m
+# CONFIG_SENSORS_ADM1275 is not set
+# CONFIG_SENSORS_LM25066 is not set
+# CONFIG_SENSORS_LTC2978 is not set
+# CONFIG_SENSORS_MAX16064 is not set
+# CONFIG_SENSORS_MAX34440 is not set
+CONFIG_SENSORS_DNI_DPS460=m
+# CONFIG_SENSORS_MAX8688 is not set
+# CONFIG_SENSORS_UCD9000 is not set
+# CONFIG_SENSORS_UCD9200 is not set
+# CONFIG_SENSORS_ZL6100 is not set
# CONFIG_SENSORS_SHT15 is not set
CONFIG_SENSORS_SHT21=m
# CONFIG_SENSORS_SHTC1 is not set
@@ -5131,7 +5148,7 @@ CONFIG_LEDS_LT3593=m
CONFIG_LEDS_DELL_NETBOOKS=m
# CONFIG_LEDS_TCA6507 is not set
# CONFIG_LEDS_LM355x is not set
-
+CONFIG_LEDS_ACCTON_AS7512_32x=m
#
# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)
#

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Always deselect channel after transaction for PCA954x.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain the nature of this patch, is it a driver bug we are fixing (upstreamed) or is it a workaround for the hardware platform.


Roy <roy_lee@CicadaBuildServer.accton.com.tw>

---
drivers/i2c/muxes/i2c-mux-pca954x.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
index 9bd4212..01c205b 100644
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
@@ -233,8 +233,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)
- ? pca954x_deselect_mux : NULL);
+ pca954x_deselect_mux);

if (data->virt_adaps[num] == NULL) {
ret = -ENODEV;

Loading