Skip to content
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
Original file line number Diff line number Diff line change
@@ -1 +1 @@
!include $ONL_TEMPLATES/platform-modules.yml VENDOR=accton BASENAME=x86-64-accton-as5812-54x ARCH=amd64 KERNELS="onl-kernel-4.14-lts-x86-64-all:amd64"
!include $ONL_TEMPLATES/platform-modules.yml VENDOR=accton BASENAME=x86-64-accton-as5812-54x ARCH=amd64 KERNELS="onl-kernel-6.12-lts-x86-64-all:amd64"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
KERNELS := onl-kernel-4.14-lts-x86-64-all:amd64
KMODULES := $(wildcard *.c)
KERNELS := onl-kernel-6.12-lts-x86-64-all:amd64
KMODULES := src
VENDOR := accton
BASENAME := x86-64-accton-as5812-54x
ARCH := x86_64
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
obj-m += x86-64-accton-as5812-54x-cpld.o
obj-m += x86-64-accton-as5812-54x-fan.o
obj-m += x86-64-accton-as5812-54x-leds.o
obj-m += x86-64-accton-as5812-54x-psu.o
Original file line number Diff line number Diff line change
Expand Up @@ -1042,11 +1042,11 @@ static ssize_t show_version(struct device *dev, struct device_attribute *attr, c
/*
* I2C init/probing/exit functions
*/
static int as5812_54x_cpld_mux_probe(struct i2c_client *client,
const struct i2c_device_id *id)
static int as5812_54x_cpld_mux_probe(struct i2c_client *client)
{
const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent);
int num, force, class;
int num, force;
struct i2c_mux_core *muxc;
struct as5812_54x_cpld_data *data;
int ret = 0;
Expand All @@ -1071,9 +1071,8 @@ static int as5812_54x_cpld_mux_probe(struct i2c_client *client,
/* Now create an adapter for each channel */
for (num = 0; num < chips[data->type].nchans; num++) {
force = 0; /* dynamic adap number */
class = 0; /* no class by default */

ret = i2c_mux_add_adapter(muxc, force, num, class);
ret = i2c_mux_add_adapter(muxc, force, num);

if (ret) {
dev_err(&client->dev,
Expand Down Expand Up @@ -1127,7 +1126,7 @@ static int as5812_54x_cpld_mux_probe(struct i2c_client *client,
return ret;
}

static int as5812_54x_cpld_mux_remove(struct i2c_client *client)
static void as5812_54x_cpld_mux_remove(struct i2c_client *client)
{
struct i2c_mux_core *muxc = i2c_get_clientdata(client);
struct as5812_54x_cpld_data *data = i2c_mux_priv(muxc);
Expand Down Expand Up @@ -1155,8 +1154,6 @@ static int as5812_54x_cpld_mux_remove(struct i2c_client *client)
}

i2c_mux_del_adapters(muxc);

return 0;
}

static int as5812_54x_cpld_read_internal(struct i2c_client *client, u8 reg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,12 +371,10 @@ static int accton_as5812_54x_fan_probe(struct platform_device *pdev)
return status;
}

static int accton_as5812_54x_fan_remove(struct platform_device *pdev)
static void accton_as5812_54x_fan_remove(struct platform_device *pdev)
{
hwmon_device_unregister(fan_data->hwmon_dev);
sysfs_remove_group(&fan_data->pdev->dev.kobj, &accton_as5812_54x_fan_group);

return 0;
}

#define DRVNAME "as5812_54x_fan"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,15 +521,13 @@ static int accton_as5812_54x_led_probe(struct platform_device *pdev)
return ret;
}

static int accton_as5812_54x_led_remove(struct platform_device *pdev)
static void accton_as5812_54x_led_remove(struct platform_device *pdev)
{
int i;

for (i = 0; i < ARRAY_SIZE(accton_as5812_54x_leds); i++) {
led_classdev_unregister(&accton_as5812_54x_leds[i]);
}

return 0;
}

static struct platform_driver accton_as5812_54x_led_driver = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ static const struct attribute_group as5812_54x_psu_group = {
.attrs = as5812_54x_psu_attributes,
};

static int as5812_54x_psu_probe(struct i2c_client *client,
const struct i2c_device_id *dev_id)
static int as5812_54x_psu_probe(struct i2c_client *client)
{
const struct i2c_device_id *dev_id = i2c_client_get_device_id(client);
struct as5812_54x_psu_data *data;
int status;

Expand Down Expand Up @@ -248,15 +248,13 @@ static int as5812_54x_psu_probe(struct i2c_client *client,
return status;
}

static int as5812_54x_psu_remove(struct i2c_client *client)
static void as5812_54x_psu_remove(struct i2c_client *client)
{
struct as5812_54x_psu_data *data = i2c_get_clientdata(client);

hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &as5812_54x_psu_group);
kfree(data);

return 0;
}

enum psu_index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#define PSU1_AC_3YPOWER_EEPROM_NODE(node) PSU1_AC_3YPOWER_EEPROM_PREFIX#node
#define PSU2_AC_3YPOWER_EEPROM_NODE(node) PSU2_AC_3YPOWER_EEPROM_PREFIX#node

#define IDPROM_PATH "/sys/devices/pci0000:00/0000:00:13.0/i2c-1/1-0057/eeprom"
#define IDPROM_PATH "/sys/bus/i2c/devices/1-0057/eeprom"

int deviceNodeWriteInt(char *filename, int value, int data_len);
int deviceNodeReadBinary(char *filename, char *buffer, int buf_size, int data_len);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ onlp_sysi_platform_info_get(onlp_platform_info_t* pi)
{
int i, siz=NUM_OF_CPLD, v[NUM_OF_CPLD]={0};
int fd, len, nbytes = 10;
onlp_onie_info_t onie;
onlp_onie_info_t onie = {0};
char r_data[10] = {0};
char fullpath[65] = {0};
char *bios_ver = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ x86-64-accton-as5812-54x-r0:
--stop=1

kernel:
<<: *kernel-4-14
<<: *kernel-6-12

args: >-
nopat
Expand Down