[devices]: enable sonic-platform-modules-cel

This commit is contained in:
Guohan Lu 2018-02-16 03:53:12 +00:00
parent f489bea105
commit ec9dc57704
7 changed files with 351 additions and 339 deletions

View File

@ -6,7 +6,7 @@ include $(PLATFORM_PATH)/platform-modules-dell.mk
include $(PLATFORM_PATH)/platform-modules-ingrasys.mk
include $(PLATFORM_PATH)/platform-modules-accton.mk
include $(PLATFORM_PATH)/platform-modules-inventec.mk
#include $(PLATFORM_PATH)/platform-modules-cel.mk
include $(PLATFORM_PATH)/platform-modules-cel.mk
#include $(PLATFORM_PATH)/platform-modules-delta.mk
include $(PLATFORM_PATH)/platform-modules-quanta.mk
#include $(PLATFORM_PATH)/platform-modules-mitac.mk

View File

@ -7,6 +7,9 @@
# Precompiled Headers
*.gch
*.pch
*.mod.c
*.ko.cmd
*.o.cmd
# Libraries
*.lib

View File

@ -7,6 +7,6 @@ Standards-Version: 3.9.3
Package: platform-modules-dx010
Architecture: amd64
Depends: linux-image-3.16.0-5-amd64
Depends: linux-image-4.9.0-5-amd64
Description: kernel modules for platform devices such as fan, led, sfp

View File

View File

@ -1 +1,6 @@
obj-m := dx010_cpld.o mc24lc64t.o emc2305.o dx010_wdt.o leds-dx010.o lm75.o
KVERSION = $(shell uname -r)
all:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean

View File

@ -104,7 +104,7 @@ static inline long lm75_reg_to_mc(s16 temp, u8 resolution)
/* sysfs attributes for hwmon */
static int lm75_read_temp(void *dev, long *temp)
static int lm75_read_temp(void *dev, int *temp)
{
struct lm75_data *data = lm75_update_device(dev);
@ -179,6 +179,10 @@ ATTRIBUTE_GROUPS(lm75);
/*-----------------------------------------------------------------------*/
static const struct thermal_zone_of_device_ops lm75_of_thermal_ops = {
.get_temp = lm75_read_temp,
};
/* device probe and removal */
static int
@ -299,7 +303,7 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
data->tz = thermal_zone_of_sensor_register(data->hwmon_dev,
0,
data->hwmon_dev,
lm75_read_temp, NULL);
&lm75_of_thermal_ops);
if (IS_ERR(data->tz))
data->tz = NULL;