Add Advantech iManager EC driver set
Subsystems (10)
cover Add Advantech iManager EC driver set
From: Richard Vidal-Dorsch <[email protected]>
The Advantech iManager is an embedded controller (depending on board type, ITE it8518/it8528) on which a custom firmware runs. All drivers (GPIO, I2C, HWmon, Watchdog, and backlight) are being managed by the imanager mfd driver. The imanager mfd driver acts as a 'gateway' and handles all communications between the EC and sub-drivers (GPIO, I2C, ...). The feature specific communication portions are split up into core files such as imanager-ec-[gpio, i2c, ...].
Richard Vidal-Dorsch (6):
Add Advantech iManager MFD core driver
Add Advantech iManager GPIO driver
Add Advantech iManager HWmon driver
Add Advantech iManager I2C driver
Add Advantech iManager Backlight driver
Add Advantech iManager Watchdog driver
Documentation/devicetree/bindings/mfd/imanager.txt | 33 + Documentation/hwmon/imanager | 59 + Documentation/i2c/busses/i2c-imanager | 48 + MAINTAINERS | 13 + drivers/gpio/Kconfig | 8 + drivers/gpio/Makefile | 2 + drivers/gpio/imanager-ec-gpio.c | 98 ++ drivers/gpio/imanager-gpio.c | 182 +++ drivers/hwmon/Kconfig | 12 + drivers/hwmon/Makefile | 2 + drivers/hwmon/imanager-ec-hwmon.c | 606 +++++++++ drivers/hwmon/imanager-hwmon.c | 1058 +++++++++++++++ drivers/i2c/busses/Kconfig | 11 + drivers/i2c/busses/Makefile | 2 + drivers/i2c/busses/imanager-ec-i2c.c | 466 +++++++ drivers/i2c/busses/imanager-i2c.c | 240 ++++ drivers/mfd/Kconfig | 20 + drivers/mfd/Makefile | 2 + drivers/mfd/imanager-core.c | 288 +++++ drivers/mfd/imanager-ec.c | 1345 ++++++++++++++++++++ drivers/video/backlight/Kconfig | 12 + drivers/video/backlight/Makefile | 2 + drivers/video/backlight/imanager-bl.c | 199 +++ drivers/video/backlight/imanager-ec-bl.c | 118 ++ drivers/watchdog/Kconfig | 12 + drivers/watchdog/Makefile | 2 + drivers/watchdog/imanager-ec-wdt.c | 170 +++ drivers/watchdog/imanager-wdt.c | 334 +++++ include/linux/mfd/imanager/backlight.h | 37 + include/linux/mfd/imanager/core.h | 31 + include/linux/mfd/imanager/ec.h | 210 +++ include/linux/mfd/imanager/gpio.h | 27 + include/linux/mfd/imanager/hwmon.h | 120 ++ include/linux/mfd/imanager/i2c.h | 55 + include/linux/mfd/imanager/wdt.h | 37 + 35 files changed, 5861 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/imanager.txt create mode 100644 Documentation/hwmon/imanager create mode 100644 Documentation/i2c/busses/i2c-imanager create mode 100644 drivers/gpio/imanager-ec-gpio.c create mode 100644 drivers/gpio/imanager-gpio.c create mode 100644 drivers/hwmon/imanager-ec-hwmon.c create mode 100644 drivers/hwmon/imanager-hwmon.c create mode 100644 drivers/i2c/busses/imanager-ec-i2c.c create mode 100644 drivers/i2c/busses/imanager-i2c.c create mode 100644 drivers/mfd/imanager-core.c create mode 100644 drivers/mfd/imanager-ec.c create mode 100644 drivers/video/backlight/imanager-bl.c create mode 100644 drivers/video/backlight/imanager-ec-bl.c create mode 100644 drivers/watchdog/imanager-ec-wdt.c create mode 100644 drivers/watchdog/imanager-wdt.c create mode 100644 include/linux/mfd/imanager/backlight.h create mode 100644 include/linux/mfd/imanager/core.h create mode 100644 include/linux/mfd/imanager/ec.h create mode 100644 include/linux/mfd/imanager/gpio.h create mode 100644 include/linux/mfd/imanager/hwmon.h create mode 100644 include/linux/mfd/imanager/i2c.h create mode 100644 include/linux/mfd/imanager/wdt.h
Signature · 1 line
2.6.4
PATCH 1/6 Add Advantech iManager MFD core driver
From: Richard Vidal-Dorsch <[email protected]>
This patch adds Advantech iManager Embedded Controller MFD core driver. This mfd core dirver provides an interface to GPIO, I2C, HWmon, Watchdog, and Backlight/Brightness control.
--- Documentation/devicetree/bindings/mfd/imanager.txt | 33 + MAINTAINERS | 13 + drivers/mfd/Kconfig | 20 + drivers/mfd/Makefile | 2 + drivers/mfd/imanager-core.c | 288 +++++ drivers/mfd/imanager-ec.c | 1345 ++++++++++++++++++++ include/linux/mfd/imanager/core.h | 31 + include/linux/mfd/imanager/ec.h | 210 +++ 8 files changed, 1942 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/imanager.txt create mode 100644 drivers/mfd/imanager-core.c create mode 100644 drivers/mfd/imanager-ec.c create mode 100644 include/linux/mfd/imanager/core.h create mode 100644 include/linux/mfd/imanager/ec.h
Documentation/devicetree/bindings/mfd/imanager.txt new file +33 -0
@@ -0,0 +1,33 @@ +Note +==== + +This is a set of platform drivers which provide support for multiple +embedded features such as GPIO, I2C/SMBus, Hardware Monitoring, Watchdog, +and Backlight/Brightness control. Those features are available on Advantech +Embedded boards such as SOM, MIO, AIMB, and PCM. +Datasheets of each product line can be downloaded from www.advantech.com + +Author: + Richard Vidal-Dorsch <[email protected]> + + +Kernel driver imanager +====================== + +This driver provides a communication layer to the Advantech iManager EC +firmware which is factory loaded onto ITE IT8518/28 chips. The type of +communication is message based. Clients (gpio, i2c, hwmon etc. drivers) +request data from Advantech iManager (polling, not interrupt driven). If +a response is been received within a time frame, the data is been extracted +from the message and then passed to the caller (clients). + + Supported chips: + * Advantech EC based on ITE IT8518 + Prefix: imanager + Addresses: 0x029e/0x029f + Datasheet: Available from ITE upon request + * Advantech EC based on ITE IT8528 + Prefix: imanager + Addresses: 0x0299/0x29a + Datasheet: Available from ITE upon request +
MAINTAINERS +13 -0
@@ -5391,6 +5391,19 @@ M: Stanislaw Gruszka <[email protected]> S: Maintained F: drivers/usb/atm/ueagle-atm.c +IMANAGER ADVANTECH EC DRIVER +M: Richard Vidal-Dorsch <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/mfd/imanager.txt +F: Documentation/hwmon/imanager +F: Documentation/i2c/busses/i2c-imanager +F: drivers/mfd/imanager-core.c +F: drivers/gpio/imanager-gpio.c +F: drivers/hwmon/imanager-hwmon.c +F: drivers/i2c/busses/imanager-i2c.c +F: drivers/video/backlight/imanager-bl.c +F: drivers/watchdog/imanager-wdt.c + INA209 HARDWARE MONITOR DRIVER M: Guenter Roeck <[email protected]> L: [email protected]
drivers/mfd/Kconfig +20 -0
@@ -322,6 +322,26 @@ config MFD_INTEL_QUARK_I2C_GPIO their respective IO driver. The GPIO exports a total amount of 8 interrupt-capable GPIOs. +config MFD_IMANAGER + tristate "Advantech iManager Embedded Controller" + depends on PCI + depends on X86 + select MFD_CORE + help + This is the core driver for Advantech iManager EC as found on some + Advantech SOM, MIO, AIMB, and PCM modules/boards. The EC may provide + functions like GPIO, I2C interface, HW monitoring, Watchdog, and + backlight/brightness control. + + The following Advantech boards are supported: + * All SOM modules newer than SOM-5788 + * MIO-5250/5251/5270/5271 and newer + * PCM-9388 + * AIMB-274/231 + + This driver can also be built as a module. If so, the module + will be called imanager. + config LPC_ICH tristate "Intel ICH LPC" depends on PCI
drivers/mfd/Makefile +2 -0
@@ -142,6 +142,8 @@ obj-$(CONFIG_MFD_DB8500_PRCMU) += db8500-prcmu.o obj-$(CONFIG_AB8500_CORE) += ab8500-core.o ab8500-sysctrl.o obj-$(CONFIG_MFD_TIMBERDALE) += timberdale.o obj-$(CONFIG_PMIC_ADP5520) += adp5520.o +imanager-objs := imanager-core.o imanager-ec.o +obj-$(CONFIG_MFD_IMANAGER) += imanager.o obj-$(CONFIG_MFD_KEMPLD) += kempld-core.o obj-$(CONFIG_MFD_INTEL_QUARK_I2C_GPIO) += intel_quark_i2c_gpio.o obj-$(CONFIG_LPC_SCH) += lpc_sch.o
drivers/mfd/imanager-core.c new file +288 -0
288 lines not on this page · raw message
drivers/mfd/imanager-ec.c new file +1345 -0
1,345 lines not on this page · raw message
include/linux/mfd/imanager/core.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Advantech iManager MFD core +* +* Copyright (C) 2015 Advantech Co., Ltd., Irvine, CA, USA +* Author: Richard Vidal-Dorsch <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +*/ + +#ifndef __CORE_H__ +#define __CORE_H__ + +#include <linux/mutex.h> +#include <linux/io.h> +#include <linux/types.h> +#include <linux/mfd/imanager/ec.h> + +struct imanager_platform_data { +const struct imanager_ec_device *dev; +const char *chip_name; +}; + +struct imanager_device_data { +struct device *dev; +struct mutex lock; +}; + +#endif
include/linux/mfd/imanager/ec.h new file +210 -0
210 lines not on this page · raw message
Signature · 1 line
2.6.4
PATCH 2/6 Add Advantech iManager GPIO driver
In reply to [email protected]From: Richard Vidal-Dorsch <[email protected]>
--- drivers/gpio/Kconfig | 8 ++ drivers/gpio/Makefile | 2 + drivers/gpio/imanager-ec-gpio.c | 98 ++++++++++++++++++++ drivers/gpio/imanager-gpio.c | 182 ++++++++++++++++++++++++++++++++++++++ include/linux/mfd/imanager/gpio.h | 27 ++++++ 5 files changed, 317 insertions(+) create mode 100644 drivers/gpio/imanager-ec-gpio.c create mode 100644 drivers/gpio/imanager-gpio.c create mode 100644 include/linux/mfd/imanager/gpio.h
drivers/gpio/Kconfig +8 -0
@@ -765,6 +765,14 @@ config GPIO_DLN2 This driver can also be built as a module. If so, the module will be called gpio-dln2. +config GPIO_IMANAGER + tristate "Advantech iManager GPIO support" + depends on MFD_IMANAGER + help + Say yes here to support Advantech iManager GPIO functionality + of some Advantech SOM, MIO, AIMB, and PCM modules/boards. + Requires mfd-core and imanager-core to function properly. + config GPIO_JANZ_TTL tristate "Janz VMOD-TTL Digital IO Module" depends on MFD_JANZ_CMODIO
drivers/gpio/Makefile +2 -0
@@ -41,6 +41,8 @@ obj-$(CONFIG_GPIO_F7188X) += gpio-f7188x.o obj-$(CONFIG_GPIO_GE_FPGA) += gpio-ge.o obj-$(CONFIG_GPIO_GRGPIO) += gpio-grgpio.o obj-$(CONFIG_GPIO_ICH) += gpio-ich.o +gpio-imanager-objs := imanager-gpio.o imanager-ec-gpio.o +obj-$(CONFIG_GPIO_IMANAGER) += gpio-imanager.o obj-$(CONFIG_GPIO_IOP) += gpio-iop.o obj-$(CONFIG_GPIO_IT87) += gpio-it87.o obj-$(CONFIG_GPIO_JANZ_TTL) += gpio-janz-ttl.o
drivers/gpio/imanager-ec-gpio.c new file +98 -0
98 lines not on this page · raw message
drivers/gpio/imanager-gpio.c new file +182 -0
182 lines not on this page · raw message
include/linux/mfd/imanager/gpio.h new file +27 -0
@@ -0,0 +1,27 @@ +/* +* Advantech iManager GPIO core +* +* Copyright (C) 2015 Advantech Co., Ltd., Irvine, CA, USA +* Author: Richard Vidal-Dorsch <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +*/ + +#ifndef __GPIO_H__ +#define __GPIO_H__ + +#include <linux/gpio.h> +#include <linux/types.h> + +int gpio_core_init (void ); + +int gpio_core_get_max_count (void ); + +int gpio_core_get_state (u32 num); +int gpio_core_set_state (u32 num,bool state); +int gpio_core_set_direction (u32 num,int dir); + +#endif
Signature · 1 line
2.6.4
PATCH 3/6 Add Advantech iManager HWmon driver
In reply to [email protected]From: Richard Vidal-Dorsch <[email protected]>
--- Documentation/hwmon/imanager | 59 ++ drivers/hwmon/Kconfig | 12 + drivers/hwmon/Makefile | 2 + drivers/hwmon/imanager-ec-hwmon.c | 606 +++++++++++++++++++++ drivers/hwmon/imanager-hwmon.c | 1058 ++++++++++++++++++++++++++++++++++++ include/linux/mfd/imanager/hwmon.h | 120 ++++ 6 files changed, 1857 insertions(+) create mode 100644 Documentation/hwmon/imanager create mode 100644 drivers/hwmon/imanager-ec-hwmon.c create mode 100644 drivers/hwmon/imanager-hwmon.c create mode 100644 include/linux/mfd/imanager/hwmon.h
Documentation/hwmon/imanager new file +59 -0
@@ -0,0 +1,59 @@ +Kernel driver imanager_hwmon +============================ + +This platform driver provides support for iManager Hardware Monitoring +and FAN control. + +This driver depends on imanager (mfd). + +Description +----------- + +This driver provides support for the Advantech iManager Hardware Monitoring EC. + +The Advantech iManager supports up to 3 fan rotation speed sensors, +3 temperature monitoring sources and up to 5 voltage sensors, VID, alarms and +a automatic fan regulation strategy (as well as manual fan control mode). + +Temperatures are measured in degrees Celsius and measurement resolution is +1 degC. An Alarm is triggered when the temperature gets higher than the high +limit; it stays on until the temperature falls below the high limit. + +Fan rotation speeds are reported in RPM (rotations per minute). An alarm is +triggered if the rotation speed has dropped below a programmable limit. No fan +speed divider support available. + +Voltage sensors (also known as IN sensors) report their values in millivolts. +An alarm is triggered if the voltage has crossed a programmable minimum +or maximum limit. + +The driver supports automatic fan control mode known as Thermal Cruise. +In this mode, the firmware attempts to keep the measured temperature in a +predefined temperature range. If the temperature goes out of range, fan +is driven slower/faster to reach the predefined range again. + +The mode works for fan1-fan3. + +sysfs attributes +---------------- + +pwm[1-3] - this file stores PWM duty cycle or DC value (fan speed) in range: + 0 (lowest speed) to 255 (full) + +pwm[1-3]_enable - this file controls mode of fan/temperature control: + * 0 Fan control disabled (fans set to maximum speed) + * 1 Manual mode, write to pwm[1-3] any value 0-255 + * 2 "Fan Speed Cruise" mode + +pwm[1-3]_mode - controls if output is PWM or DC level + * 0 DC output + * 1 PWM output + +Speed Cruise mode (2) +--------------------- + +This mode tries to keep the fan speed constant within min/max speed. + +fan[1-3]_min - Minimum fan speed +fan[1-3]_max - Maximum fan speed +
drivers/hwmon/Kconfig +12 -0
@@ -613,6 +613,18 @@ config SENSORS_CORETEMP sensor inside your CPU. Most of the family 6 CPUs are supported. Check Documentation/hwmon/coretemp for details. +config SENSORS_IMANAGER + tristate "Advantech iManager Hardware Monitoring" + depends on MFD_IMANAGER + select HWMON_VID + help + This enables support for Advantech iManager hardware monitoring + of some Advantech SOM, MIO, AIMB, and PCM modules/boards. + Requires mfd-core and imanager-core to function properly. + + This driver can also be built as a module. If so, the module + will be called imanager_hwmon. + config SENSORS_IT87 tristate "ITE IT87xx and compatibles" depends on !PPC
drivers/hwmon/Makefile +2 -0
@@ -76,6 +76,8 @@ obj-$(CONFIG_SENSORS_IBMAEM) += ibmaem.o obj-$(CONFIG_SENSORS_IBMPEX) += ibmpex.o obj-$(CONFIG_SENSORS_IBMPOWERNV)+= ibmpowernv.o obj-$(CONFIG_SENSORS_IIO_HWMON) += iio_hwmon.o +imanager_hwmon-objs := imanager-hwmon.o imanager-ec-hwmon.o +obj-$(CONFIG_SENSORS_IMANAGER) += imanager_hwmon.o obj-$(CONFIG_SENSORS_INA209) += ina209.o obj-$(CONFIG_SENSORS_INA2XX) += ina2xx.o obj-$(CONFIG_SENSORS_IT87) += it87.o
drivers/hwmon/imanager-ec-hwmon.c new file +606 -0
606 lines not on this page · raw message
drivers/hwmon/imanager-hwmon.c new file +1058 -0
1,058 lines not on this page · raw message
include/linux/mfd/imanager/hwmon.h new file +120 -0
120 lines not on this page · raw message
Signature · 6 lines
2.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 4/6 Add Advantech iManager I2C driver
In reply to [email protected]From: Richard Vidal-Dorsch <[email protected]>
--- Documentation/i2c/busses/i2c-imanager | 48 ++++ drivers/i2c/busses/Kconfig | 11 + drivers/i2c/busses/Makefile | 2 + drivers/i2c/busses/imanager-ec-i2c.c | 466 ++++++++++++++++++++++++++++++++++ drivers/i2c/busses/imanager-i2c.c | 240 +++++++++++++++++ include/linux/mfd/imanager/i2c.h | 55 ++++ 6 files changed, 822 insertions(+) create mode 100644 Documentation/i2c/busses/i2c-imanager create mode 100644 drivers/i2c/busses/imanager-ec-i2c.c create mode 100644 drivers/i2c/busses/imanager-i2c.c create mode 100644 include/linux/mfd/imanager/i2c.h
Documentation/i2c/busses/i2c-imanager new file +48 -0
@@ -0,0 +1,48 @@ +Kernel driver imanager_i2c +========================== + +This platform driver provides support for iManager I2C/SMBus. + +This driver depends on imanager (mfd). + +Module Parameters +----------------- + +* bus_frequency (unsigned short) +Set desired bus frequency. Valid values (kHz) are: + 50 Slow + 100 Standard (default) + 400 Fast + + +Description +----------- + +The Advantech iManager provides up to four SMBus controllers. One of them +is configured for I2C compatibility. + + +Process Call Support +-------------------- + +Not supported. + + +I2C Block Read Support +---------------------- + +I2C block read is supported. + + +SMBus 2.0 Support +----------------- + +Several SMBus 2.0 features are supported. +No PEC support. + + +Interrupt Support +----------------- + +No interrupt support available +
drivers/i2c/busses/Kconfig +11 -0
@@ -42,6 +42,17 @@ config I2C_ALI15X3 This driver can also be built as a module. If so, the module will be called i2c-ali15x3. +config I2C_IMANAGER + tristate "Advantech iManager I2C Interface" + depends on MFD_IMANAGER + help + This enables support for Advantech iManager I2C of some + Advantech SOM, MIO, AIMB, and PCM modules/boards. + Requires mfd-core and imanager-core to function properly. + + This driver can also be built as a module. If so, the module + will be called i2c-imanager. + config I2C_AMD756 tristate "AMD 756/766/768/8111 and nVidia nForce" depends on PCI
drivers/i2c/busses/Makefile +2 -0
@@ -15,6 +15,8 @@ obj-$(CONFIG_I2C_AMD8111) += i2c-amd8111.o obj-$(CONFIG_I2C_I801) += i2c-i801.o obj-$(CONFIG_I2C_ISCH) += i2c-isch.o obj-$(CONFIG_I2C_ISMT) += i2c-ismt.o +i2c-imanager-objs := imanager-i2c.o imanager-ec-i2c.o +obj-$(CONFIG_I2C_IMANAGER) += i2c-imanager.o obj-$(CONFIG_I2C_NFORCE2) += i2c-nforce2.o obj-$(CONFIG_I2C_NFORCE2_S4985) += i2c-nforce2-s4985.o obj-$(CONFIG_I2C_PIIX4) += i2c-piix4.o
drivers/i2c/busses/imanager-ec-i2c.c new file +466 -0
466 lines not on this page · raw message
drivers/i2c/busses/imanager-i2c.c new file +240 -0
240 lines not on this page · raw message
include/linux/mfd/imanager/i2c.h new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
2.6.4
PATCH 5/6 Add Advantech iManager Backlight driver
In reply to [email protected]From: Richard Vidal-Dorsch <[email protected]>
--- drivers/video/backlight/Kconfig | 12 ++ drivers/video/backlight/Makefile | 2 + drivers/video/backlight/imanager-bl.c | 199 +++++++++++++++++++++++++++++++ drivers/video/backlight/imanager-ec-bl.c | 118 ++++++++++++++++++ include/linux/mfd/imanager/backlight.h | 37 ++++++ 5 files changed, 368 insertions(+) create mode 100644 drivers/video/backlight/imanager-bl.c create mode 100644 drivers/video/backlight/imanager-ec-bl.c create mode 100644 include/linux/mfd/imanager/backlight.h
drivers/video/backlight/Kconfig +12 -0
@@ -251,6 +251,18 @@ config BACKLIGHT_HP700 If you have an HP Jornada 700 series, say Y to include backlight control driver. +config BACKLIGHT_IMANAGER + tristate "Advantech iManager backlight/brightness" + depends on MFD_IMANAGER + help + This enables support for Advantech iManager Backlight and + Brightness control of some Advantech SOM, MIO, AIMB, and + PCM modules/boards. + Requires mfd-core and imanager-core to function properly. + + This driver can also be built as a module. If so, the module + will be called imanager_bl. + config BACKLIGHT_CARILLO_RANCH tristate "Intel Carillo Ranch Backlight Driver" depends on LCD_CLASS_DEVICE && PCI && X86 && FB_LE80578
drivers/video/backlight/Makefile +2 -0
@@ -26,6 +26,8 @@ obj-$(CONFIG_BACKLIGHT_ADP8870) += adp8870_bl.o obj-$(CONFIG_BACKLIGHT_APPLE) += apple_bl.o obj-$(CONFIG_BACKLIGHT_AS3711) += as3711_bl.o obj-$(CONFIG_BACKLIGHT_BD6107) += bd6107.o +imanager_bl-objs := imanager-bl.o imanager-ec-bl.o +obj-$(CONFIG_BACKLIGHT_IMANAGER) += imanager_bl.o obj-$(CONFIG_BACKLIGHT_CARILLO_RANCH) += cr_bllcd.o obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o obj-$(CONFIG_BACKLIGHT_DA903X) += da903x_bl.o
drivers/video/backlight/imanager-bl.c new file +199 -0
199 lines not on this page · raw message
drivers/video/backlight/imanager-ec-bl.c new file +118 -0
118 lines not on this page · raw message
include/linux/mfd/imanager/backlight.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* Advantech iManager Backlight core +* +* Copyright (C) 2015 Advantech Co., Ltd., Irvine, CA, USA +* Author: Richard Vidal-Dorsch <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +*/ + +#ifndef __BACKLIGHT_H__ +#define __BACKLIGHT_H__ + +#include <linux/types.h> + +enum backlight_control { +BL_CTRL_DISABLE , +BL_CTRL_ENABLE , +}; + +enum backlight_unit { +UNIT_1 , +UNIT_2 , +}; + +int bl_core_init (void ); + +int bl_core_set_state (u32 unit,bool enable); + +int bl_core_set_polarity (u32 polarity); + +int bl_core_get_pulse_width (u32 unit); +int bl_core_set_pulse_width (u32 unit,u32 pwm); + +#endif
Signature · 1 line
2.6.4
PATCH 6/6 Add Advantech iManager Watchdog driver
In reply to [email protected]From: Richard Vidal-Dorsch <[email protected]>
--- drivers/watchdog/Kconfig | 12 ++ drivers/watchdog/Makefile | 2 + drivers/watchdog/imanager-ec-wdt.c | 170 +++++++++++++++++++ drivers/watchdog/imanager-wdt.c | 334 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/imanager/wdt.h | 37 ++++ 5 files changed, 555 insertions(+) create mode 100644 drivers/watchdog/imanager-ec-wdt.c create mode 100644 drivers/watchdog/imanager-wdt.c create mode 100644 include/linux/mfd/imanager/wdt.h
drivers/watchdog/Kconfig +12 -0
@@ -846,6 +846,18 @@ config ITCO_VENDOR_SUPPORT devices. At this moment we only have additional support for some SuperMicro Inc. motherboards. +config IMANAGER_WDT + tristate "Advantech iManager Watchdog" + depends on MFD_IMANAGER + select WATCHDOG_CORE + help + This driver provides support for Advantech iManager watchdog + of Advantech SOM, MIO, AIMB, and PCM modules/boards. + Requires mfd-core and imanager-core to function properly. + + This driver can also be built as a module. If so, the module + will be called imanager_wdt. + config IT8712F_WDT tristate "IT8712F (Smart Guardian) Watchdog Timer" depends on X86
drivers/watchdog/Makefile +2 -0
@@ -100,6 +100,8 @@ obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o ifeq ($(CONFIG_ITCO_VENDOR_SUPPORT),y) obj-$(CONFIG_ITCO_WDT) += iTCO_vendor_support.o endif +imanager_wdt-objs := imanager-wdt.o imanager-ec-wdt.o +obj-$(CONFIG_IMANAGER_WDT) += imanager_wdt.o obj-$(CONFIG_IT8712F_WDT) += it8712f_wdt.o obj-$(CONFIG_IT87_WDT) += it87_wdt.o obj-$(CONFIG_HP_WATCHDOG) += hpwdt.o
drivers/watchdog/imanager-ec-wdt.c new file +170 -0
170 lines not on this page · raw message
drivers/watchdog/imanager-wdt.c new file +334 -0
334 lines not on this page · raw message
include/linux/mfd/imanager/wdt.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* Advantech iManager Watchdog core +* +* Copyright (C) 2015 Advantech Co., Ltd., Irvine, CA, USA +* Author: Richard Vidal-Dorsch <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +*/ + +#ifndef __WDT_H__ +#define __WDT_H__ + +#include <linux/types.h> + +enum wdt_event { +DELAY , +PWRBTN , +NMI , +RESET , +WDPIN , +SCI , +}; + +int wdt_core_init (void ); + +int wdt_core_set_timeout (enum wdt_event type,u32 timeout); + +int wdt_core_disable_all (void ); +int wdt_core_start_timer (void ); +int wdt_core_stop_timer (void ); +int wdt_core_reset_timer (void ); +int wdt_core_stop_boot_timer (void ); + +#endif
Signature · 1 line
2.6.4
kbuild test robot
build bot[PATCH] fix platform_no_drv_owner.cocci warnings
In reply to [email protected]drivers/gpio/imanager-gpio.c:170:3-8: No need to set .owner here. The core will do it.
drivers/gpio/imanager-gpio.c:170:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
---
imanager-gpio.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpio/imanager-gpio.c +0 -1
@@ -167,7 +167,6 @@ static int imanager_remove(struct platfostatic struct platform_driver imanager_gpio_driver = { .driver = { - .owner =THIS_MODULE , .name ="imanager_gpio" , }, .probe = imanager_gpio_probe,
kbuild test robot
build botRe: [PATCH 2/6] Add Advantech iManager GPIO driver
In reply to [email protected]coccinelle warnings: (new ones prefixed by >>)
Hi Richard,
[auto build test WARNING on hwmon/hwmon-next]
[also build test WARNING on v4.4-rc8 next-20160108]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/richard-dorsch-gmail-com/Add-Advantech-iManager-EC-driver-set/20160109-063329 base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
coccinelle warnings: (new ones prefixed by >>)
>> drivers/gpio/imanager-gpio.c:170:3-8: No need to set .owner here. The core will do it.
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build bot[PATCH] fix platform_no_drv_owner.cocci warnings
In reply to [email protected]drivers/watchdog/imanager-wdt.c:322:3-8: No need to set .owner here. The core will do it.
drivers/watchdog/imanager-wdt.c:322:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
---
imanager-wdt.c | 1 - 1 file changed, 1 deletion(-)
drivers/watchdog/imanager-wdt.c +0 -1
@@ -319,7 +319,6 @@ static int imanager_wdt_remove(struct plstatic struct platform_driver imanager_wdt_driver = { .driver = { - .owner =THIS_MODULE , .name ="imanager_wdt" , }, .probe = imanager_wdt_probe,
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
kbuild test robot
build botRe: [PATCH 6/6] Add Advantech iManager Watchdog driver
In reply to [email protected]coccinelle warnings: (new ones prefixed by >>)
Hi Richard,
[auto build test WARNING on hwmon/hwmon-next]
[also build test WARNING on v4.4-rc8 next-20160108]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/richard-dorsch-gmail-com/Add-Advantech-iManager-EC-driver-set/20160109-063329 base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
coccinelle warnings: (new ones prefixed by >>)
>> drivers/watchdog/imanager-wdt.c:322:3-8: No need to set .owner here. The core will do it.
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
PATCH 7/8 Remove .owner from platform_driver struct
In reply to kbuild test robotFrom: Richard Vidal-Dorsch <[email protected]>
--- drivers/gpio/imanager-gpio.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpio/imanager-gpio.c +0 -1
@@ -167,7 +167,6 @@ static int imanager_remove(struct platform_device *pdev)static struct platform_driver imanager_gpio_driver = { .driver = { - .owner =THIS_MODULE , .name ="imanager_gpio" , }, .probe = imanager_gpio_probe,
Signature · 1 line
2.6.4
PATCH 8/8 Remove .owner from platform_driver struct
In reply to kbuild test robotFrom: Richard Vidal-Dorsch <[email protected]>
--- drivers/watchdog/imanager-wdt.c | 1 - 1 file changed, 1 deletion(-)
drivers/watchdog/imanager-wdt.c +0 -1
@@ -319,7 +319,6 @@ static int imanager_wdt_remove(struct platform_device *pdev)static struct platform_driver imanager_wdt_driver = { .driver = { - .owner =THIS_MODULE , .name ="imanager_wdt" , }, .probe = imanager_wdt_probe,
Signature · 1 line
2.6.4