* [PATCH] fix platform_no_drv_owner.cocci warnings
[not found] <201503291519.K9Z6Qptb%fengguang.wu@intel.com>
@ 2015-03-29 7:49 ` kbuild test robot
2015-03-30 13:05 ` Thierry Reding
0 siblings, 1 reply; 12+ messages in thread
From: kbuild test robot @ 2015-03-29 7:49 UTC (permalink / raw)
To: Alexandre Courbot
Cc: kbuild-all, Thierry Reding, Linus Walleij, linux-gpio,
linux-kernel
drivers/pinctrl/pinctrl-max77620.c:472: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
CC: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
pinctrl-max77620.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/pinctrl/pinctrl-max77620.c
+++ b/drivers/pinctrl/pinctrl-max77620.c
@@ -469,7 +469,6 @@ static int max77620_pinctrl_remove(struc
static struct platform_driver max77620_pinctrl_driver = {
.driver = {
.name = "max77620-pinctrl",
- .owner = THIS_MODULE,
},
.probe = max77620_pinctrl_probe,
.remove = max77620_pinctrl_remove,
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fix platform_no_drv_owner.cocci warnings
2015-03-29 7:49 ` kbuild test robot
@ 2015-03-30 13:05 ` Thierry Reding
2015-04-07 13:09 ` Linus Walleij
0 siblings, 1 reply; 12+ messages in thread
From: Thierry Reding @ 2015-03-30 13:05 UTC (permalink / raw)
To: kbuild test robot
Cc: Alexandre Courbot, kbuild-all, Linus Walleij, linux-gpio,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1160 bytes --]
On Sun, Mar 29, 2015 at 03:49:20PM +0800, kbuild test robot wrote:
> drivers/pinctrl/pinctrl-max77620.c:472: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
>
> CC: Alexandre Courbot <acourbot@nvidia.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
> pinctrl-max77620.c | 1 -
> 1 file changed, 1 deletion(-)
Hi Linus,
please ignore this. It's from a staging tree and against a driver that
doesn't exist upstream yet. I have for now removed these branches from
my github tree completely until we can figure out a way to keep the 0-
day builder from generating these patches.
Thierry
> --- a/drivers/pinctrl/pinctrl-max77620.c
> +++ b/drivers/pinctrl/pinctrl-max77620.c
> @@ -469,7 +469,6 @@ static int max77620_pinctrl_remove(struc
> static struct platform_driver max77620_pinctrl_driver = {
> .driver = {
> .name = "max77620-pinctrl",
> - .owner = THIS_MODULE,
> },
> .probe = max77620_pinctrl_probe,
> .remove = max77620_pinctrl_remove,
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fix platform_no_drv_owner.cocci warnings
2015-03-30 13:05 ` Thierry Reding
@ 2015-04-07 13:09 ` Linus Walleij
2015-04-08 1:24 ` Fengguang Wu
0 siblings, 1 reply; 12+ messages in thread
From: Linus Walleij @ 2015-04-07 13:09 UTC (permalink / raw)
To: Thierry Reding
Cc: kbuild test robot, Alexandre Courbot, kbuild-all@01.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
On Mon, Mar 30, 2015 at 3:05 PM, Thierry Reding <treding@nvidia.com> wrote:
> On Sun, Mar 29, 2015 at 03:49:20PM +0800, kbuild test robot wrote:
>> drivers/pinctrl/pinctrl-max77620.c:472: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
>>
>> CC: Alexandre Courbot <acourbot@nvidia.com>
>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>> ---
>>
>> pinctrl-max77620.c | 1 -
>> 1 file changed, 1 deletion(-)
>
> Hi Linus,
>
> please ignore this. It's from a staging tree and against a driver that
> doesn't exist upstream yet. I have for now removed these branches from
> my github tree completely until we can figure out a way to keep the 0-
> day builder from generating these patches.
Bah no big deal, I think I managed to fire off a similar thing on
a PWM driver down your path :P
Fengguang said he'd fixed it though IIRC.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fix platform_no_drv_owner.cocci warnings
2015-04-07 13:09 ` Linus Walleij
@ 2015-04-08 1:24 ` Fengguang Wu
0 siblings, 0 replies; 12+ messages in thread
From: Fengguang Wu @ 2015-04-08 1:24 UTC (permalink / raw)
To: Linus Walleij
Cc: Thierry Reding, Alexandre Courbot, kbuild-all@01.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
On Tue, Apr 07, 2015 at 03:09:46PM +0200, Linus Walleij wrote:
> On Mon, Mar 30, 2015 at 3:05 PM, Thierry Reding <treding@nvidia.com> wrote:
> > On Sun, Mar 29, 2015 at 03:49:20PM +0800, kbuild test robot wrote:
> >> drivers/pinctrl/pinctrl-max77620.c:472: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
> >>
> >> CC: Alexandre Courbot <acourbot@nvidia.com>
> >> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> >> ---
> >>
> >> pinctrl-max77620.c | 1 -
> >> 1 file changed, 1 deletion(-)
> >
> > Hi Linus,
> >
> > please ignore this. It's from a staging tree and against a driver that
> > doesn't exist upstream yet. I have for now removed these branches from
> > my github tree completely until we can figure out a way to keep the 0-
> > day builder from generating these patches.
>
> Bah no big deal, I think I managed to fire off a similar thing on
> a PWM driver down your path :P
>
> Fengguang said he'd fixed it though IIRC.
Yes sorry for the noise! I've listed Thierry's tree as private report
tree (the black list way). Perhaps would be better to make the logic
white list based -- then it will be completely noise free.
Thanks,
Fengguang
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] fix platform_no_drv_owner.cocci warnings
2016-01-08 22:29 ` richard.dorsch
@ 2016-01-09 0:50 ` kbuild test robot
0 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2016-01-09 0:50 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, lm-sensors, linux-i2c, linux-watchdog,
linux-gpio, lee.jones, jdelvare, linux, wim, jo.sunga,
Richard Vidal-Dorsch
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
CC: Richard Vidal-Dorsch <richard.dorsch@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
imanager-gpio.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/gpio/imanager-gpio.c
+++ b/drivers/gpio/imanager-gpio.c
@@ -167,7 +167,6 @@ static int imanager_remove(struct platfo
static struct platform_driver imanager_gpio_driver = {
.driver = {
- .owner = THIS_MODULE,
.name = "imanager_gpio",
},
.probe = imanager_gpio_probe,
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] fix platform_no_drv_owner.cocci warnings
[not found] ` <1452292166-20118-7-git-send-email-richard.dorsch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-01-09 2:02 ` kbuild test robot
0 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2016-01-09 2:02 UTC (permalink / raw)
Cc: kbuild-all-JC7UmRfGjtg, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
linux-gpio-u79uwXL29TY76Z2rM5mHXA,
lee.jones-QSEj5FYQhm4dnm+yROfE0A, jdelvare-IBi9RG/b67k,
linux-0h96xk9xTtrk1uMJSBkQmQ, wim-IQzOog9fTRqzQB+pC5nmwQ,
jo.sunga-ELdSlb/RfAS1Z/+hSey0Gg, Richard Vidal-Dorsch
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
CC: Richard Vidal-Dorsch <richard.dorsch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
imanager-wdt.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/watchdog/imanager-wdt.c
+++ b/drivers/watchdog/imanager-wdt.c
@@ -319,7 +319,6 @@ static int imanager_wdt_remove(struct pl
static 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 5/6] Add Advantech iManager Backlight driver
@ 2016-01-10 9:11 richard.dorsch
2016-01-10 10:44 ` kbuild test robot
0 siblings, 1 reply; 12+ messages in thread
From: richard.dorsch @ 2016-01-10 9:11 UTC (permalink / raw)
To: linux-kernel
Cc: lm-sensors, linux-i2c, linux-watchdog, linux-gpio, lee.jones,
jdelvare, linux, wim, jo.sunga, Richard Vidal-Dorsch
From: Richard Vidal-Dorsch <richard.dorsch@gmail.com>
Signed-off-by: Richard Vidal-Dorsch <richard.dorsch@gmail.com>
---
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
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 5ffa4b4..8003573 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -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
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index 16ec534..15bf136 100644
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -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
diff --git a/drivers/video/backlight/imanager-bl.c b/drivers/video/backlight/imanager-bl.c
new file mode 100644
index 0000000..f773ce7
--- /dev/null
+++ b/drivers/video/backlight/imanager-bl.c
@@ -0,0 +1,199 @@
+/*
+ * Advantech iManager Backlight driver
+ * Partially derived from wm831x_bl
+ *
+ * Copyright (C) 2016 Advantech Co., Ltd., Irvine, CA, USA
+ * Author: Richard Vidal-Dorsch <richard.dorsch@advantech.com>
+ *
+ * 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.
+ */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/moduleparam.h>
+#include <linux/platform_device.h>
+#include <linux/backlight.h>
+#include <linux/fb.h>
+#include <linux/pwm.h>
+#include <linux/mfd/imanager/core.h>
+#include <linux/mfd/imanager/backlight.h>
+
+#define BL_MAX_BRIGHTNESS 100
+
+static bool polarity = PWM_POLARITY_NORMAL;
+module_param(polarity, bool, 0);
+MODULE_PARM_DESC(polarity, "Select backlight polarity (inverted := 1)");
+
+static ushort unit = UNIT_1;
+module_param(unit, ushort, 0);
+MODULE_PARM_DESC(unit, "Select backlight control unit [0, 1] (defaults to 0)");
+
+struct imanager_backlight_data {
+ struct imanager_device_data *idev;
+ struct backlight_device *bl;
+};
+
+static int get_brightness(struct backlight_device *dev)
+{
+ struct imanager_backlight_data *data = bl_get_data(dev);
+ int ret;
+
+ mutex_lock(&data->idev->lock);
+
+ ret = bl_core_get_pulse_width(unit);
+ /* Reverse percentage if polarity is set */
+ if (polarity)
+ ret = 100 - ret;
+
+ mutex_unlock(&data->idev->lock);
+
+ return ret;
+}
+
+static int set_brightness(struct backlight_device *dev)
+{
+ struct imanager_backlight_data *data = bl_get_data(dev);
+ u8 brightness = (u8) dev->props.brightness;
+ int ret;
+
+ if (brightness > BL_MAX_BRIGHTNESS)
+ return -EINVAL;
+
+ if (dev->props.power != FB_BLANK_UNBLANK)
+ brightness = 0;
+
+ if (dev->props.fb_blank != FB_BLANK_UNBLANK)
+ brightness = 0;
+
+ if (dev->props.state & BL_CORE_SUSPENDED)
+ brightness = 0;
+
+ mutex_lock(&data->idev->lock);
+
+ /* Inversed percentage if polarity is set */
+ if (polarity)
+ brightness = 100 - brightness;
+ ret = bl_core_set_pulse_width(unit, brightness);
+
+ mutex_unlock(&data->idev->lock);
+
+ return ret;
+}
+
+static const struct backlight_ops imanager_bl_ops = {
+ .options = BL_CORE_SUSPENDRESUME,
+ .get_brightness = get_brightness,
+ .update_status = set_brightness,
+};
+
+static int imanager_backlight_init(struct device *dev,
+ struct imanager_backlight_data *data)
+{
+ struct backlight_device *bd;
+ struct backlight_properties props;
+
+ memset(&props, 0, sizeof(props));
+ props.type = BACKLIGHT_PLATFORM;
+ props.max_brightness = BL_MAX_BRIGHTNESS;
+ bd = backlight_device_register("imanager_backlight", dev, data,
+ &imanager_bl_ops, &props);
+
+ if (IS_ERR(bd)) {
+ data->bl = NULL;
+ dev_err(dev, "Unable to register backlight device\n");
+ return PTR_ERR(bd);
+ }
+
+ data->bl = bd;
+
+ bd->props.brightness = get_brightness(bd);
+ bd->props.power = FB_BLANK_UNBLANK;
+ backlight_update_status(bd);
+
+ return 0;
+}
+
+static int imanager_backlight_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct imanager_device_data *idev = dev_get_drvdata(dev->parent);
+ struct imanager_backlight_data *data;
+ int ret;
+
+ if (!idev) {
+ dev_err(dev, "Invalid platform data\n");
+ return -EINVAL;
+ }
+
+ ret = bl_core_init();
+ if (ret) {
+ dev_err(dev, "Failed to initialize backlight core\n");
+ return -EIO;
+ }
+
+ ret = bl_core_set_state(unit, BL_CTRL_ENABLE);
+ if (ret < 0) {
+ dev_err(dev, "Failed to enable backlight control (%d)\n",
+ unit);
+ return -EIO;
+ }
+
+ if (polarity)
+ ret = bl_core_set_polarity(PWM_POLARITY_INVERSED);
+ else
+ ret = bl_core_set_polarity(PWM_POLARITY_NORMAL);
+ if (ret < 0) {
+ dev_err(dev, "Failed to set backlight polarity\n");
+ return -EIO;
+ }
+
+ /* init brightness to 60% */
+ bl_core_set_pulse_width(unit, 60);
+
+ data = devm_kzalloc(dev, sizeof(struct imanager_backlight_data),
+ GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ data->idev = idev;
+
+ ret = imanager_backlight_init(dev, data);
+ if (ret)
+ return ret;
+
+ platform_set_drvdata(pdev, data);
+
+ return 0;
+}
+
+static int imanager_backlight_remove(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct imanager_backlight_data *data = dev_get_drvdata(dev);
+
+ backlight_device_unregister(data->bl);
+
+ return 0;
+}
+
+static struct platform_driver imanager_backlight_driver = {
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "imanager_backlight",
+ },
+ .probe = imanager_backlight_probe,
+ .remove = imanager_backlight_remove,
+};
+
+module_platform_driver(imanager_backlight_driver);
+
+MODULE_DESCRIPTION("Advantech iManager Backlight driver");
+MODULE_AUTHOR("Richard Vidal-Dorsch <richard.dorsch at advantech.com>");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:imanager_backlight");
diff --git a/drivers/video/backlight/imanager-ec-bl.c b/drivers/video/backlight/imanager-ec-bl.c
new file mode 100644
index 0000000..04d2478
--- /dev/null
+++ b/drivers/video/backlight/imanager-ec-bl.c
@@ -0,0 +1,118 @@
+/*
+ * Advantech iManager Backlight/Brightness Core
+ *
+ * Copyright (C) 2016 Advantech Co., Ltd., Irvine, CA, USA
+ * Author: Richard Vidal-Dorsch <richard.dorsch@advantech.com>
+ *
+ * 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.
+ */
+
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/bug.h>
+#include <linux/io.h>
+#include <linux/delay.h>
+#include <linux/string.h>
+#include <linux/byteorder/generic.h>
+#include <linux/mfd/imanager/ec.h>
+#include <linux/mfd/imanager/backlight.h>
+
+struct brightness_level {
+ u32 value : 7, /* Brightness Value - LSB [6..0] */
+ enable : 1; /* Brightness Enable - MSB [7] */
+};
+
+struct backlight_ctrl {
+ u32 enable : 1, /* Backlight Control Enable - LSB [0] */
+ pwmpol : 1, /* PWM Polarity - bit [1] */
+ blpol : 1, /* Backlight Polarity - bit [2] */
+ dnc : 5; /* Don't care - bit [7..3] */
+};
+
+static const struct imanager_backlight_device *bl;
+
+int bl_core_get_pulse_width(u32 unit)
+{
+ int ret;
+
+ if (WARN_ON(unit >= EC_BLC_MAX_NUM))
+ return -EINVAL;
+
+ ret = imanager_read_byte(EC_CMD_HWP_RD, bl->attr[unit].did);
+ if (ret < 0)
+ pr_err("Failed reading PWM (unit=%d)\n", unit);
+
+ return ret;
+}
+
+int bl_core_set_pulse_width(u32 unit, u32 pwm)
+{
+ int ret;
+
+ if (WARN_ON(unit >= EC_BLC_MAX_NUM))
+ return -EINVAL;
+
+ pwm = pwm > 100 ? 100 : pwm;
+
+ ret = imanager_write_byte(EC_CMD_HWP_WR, bl->attr[unit].did, pwm);
+ if (ret < 0)
+ pr_err("Failed writing PWM (val=%d, unit=%d)\n", pwm, unit);
+
+ return ret;
+}
+
+int bl_core_set_state(u32 unit, bool enable)
+{
+ int ret;
+ u8 val8;
+ struct brightness_level *pl = (struct brightness_level *)&val8;
+
+ if (WARN_ON(unit >= EC_BLC_MAX_NUM))
+ return -EINVAL;
+
+ ret = imanager_acpiram_read_byte(bl->brightness[unit]);
+ if (ret < 0)
+ return ret;
+ val8 = ret;
+
+ pl->enable = enable ? 1 : 0;
+
+ ret = imanager_acpiram_write_byte(bl->attr[unit].did, val8);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+
+int bl_core_set_polarity(u32 polarity)
+{
+ int ret;
+ u8 val8;
+ struct backlight_ctrl *ctrl = (struct backlight_ctrl *)&val8;
+
+ ret = imanager_acpiram_read_byte(EC_ACPIRAM_BLC_CTRL);
+ if (ret < 0)
+ return ret;
+ val8 = ret;
+
+ ctrl->blpol = polarity ? 1 : 0;
+
+ ret = imanager_acpiram_write_byte(EC_ACPIRAM_BLC_CTRL, val8);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+
+int bl_core_init(void)
+{
+ bl = imanager_get_backlight_device();
+ if (!bl)
+ return -ENODEV;
+
+ return 0;
+}
+
diff --git a/include/linux/mfd/imanager/backlight.h b/include/linux/mfd/imanager/backlight.h
new file mode 100644
index 0000000..93ea7cf5
--- /dev/null
+++ b/include/linux/mfd/imanager/backlight.h
@@ -0,0 +1,37 @@
+/*
+ * Advantech iManager Backlight core
+ *
+ * Copyright (C) 2016 Advantech Co., Ltd., Irvine, CA, USA
+ * Author: Richard Vidal-Dorsch <richard.dorsch@advantech.com>
+ *
+ * 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
--
2.6.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] fix platform_no_drv_owner.cocci warnings
2016-01-10 9:10 ` richard.dorsch-Re5JQEeQqe8AvxtiuMwx3w
@ 2016-01-10 10:11 ` kbuild test robot
0 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2016-01-10 10:11 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, lm-sensors, linux-i2c, linux-watchdog,
linux-gpio, lee.jones, jdelvare, linux, wim, jo.sunga,
Richard Vidal-Dorsch
drivers/mfd/imanager-core.c:248: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
CC: Richard Vidal-Dorsch <richard.dorsch@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
imanager-core.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/mfd/imanager-core.c
+++ b/drivers/mfd/imanager-core.c
@@ -245,7 +245,6 @@ static int imanager_remove(struct platfo
static struct platform_driver imanager_driver = {
.driver = {
- .owner = THIS_MODULE,
.name = "imanager-core",
},
.probe = imanager_probe,
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] fix platform_no_drv_owner.cocci warnings
2016-01-10 9:11 ` richard.dorsch
@ 2016-01-10 10:25 ` kbuild test robot
0 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2016-01-10 10:25 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, lm-sensors, linux-i2c, linux-watchdog,
linux-gpio, lee.jones, jdelvare, linux, wim, jo.sunga,
Richard Vidal-Dorsch
drivers/hwmon/imanager-hwmon.c:1047: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
CC: Richard Vidal-Dorsch <richard.dorsch@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
imanager-hwmon.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/hwmon/imanager-hwmon.c
+++ b/drivers/hwmon/imanager-hwmon.c
@@ -1044,7 +1044,6 @@ static int imanager_hwmon_probe(struct p
static struct platform_driver imanager_hwmon_driver = {
.driver = {
- .owner = THIS_MODULE,
.name = "imanager_hwmon",
},
.probe = imanager_hwmon_probe,
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] fix platform_no_drv_owner.cocci warnings
2016-01-10 9:11 ` richard.dorsch
@ 2016-01-10 10:34 ` kbuild test robot
0 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2016-01-10 10:34 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, lm-sensors, linux-i2c, linux-watchdog,
linux-gpio, lee.jones, jdelvare, linux, wim, jo.sunga,
Richard Vidal-Dorsch
drivers/i2c/busses/imanager-i2c.c:228: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
CC: Richard Vidal-Dorsch <richard.dorsch@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
imanager-i2c.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/i2c/busses/imanager-i2c.c
+++ b/drivers/i2c/busses/imanager-i2c.c
@@ -225,7 +225,6 @@ static int imanager_i2c_remove(struct pl
static struct platform_driver imanager_i2c_driver = {
.driver = {
- .owner = THIS_MODULE,
.name = "imanager_i2c",
},
.probe = imanager_i2c_probe,
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 5/6] Add Advantech iManager Backlight driver
2016-01-10 9:11 [PATCH v2 5/6] Add Advantech iManager Backlight driver richard.dorsch
@ 2016-01-10 10:44 ` kbuild test robot
[not found] ` <1452417098-28667-1-git-send-email-richard.dorsch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: kbuild test robot @ 2016-01-10 10:44 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, lm-sensors, linux-i2c, linux-watchdog,
linux-gpio, lee.jones, jdelvare, linux, wim, jo.sunga,
Richard Vidal-Dorsch
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/20160110-171635
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
coccinelle warnings: (new ones prefixed by >>)
>> drivers/video/backlight/imanager-bl.c:187: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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] fix platform_no_drv_owner.cocci warnings
[not found] ` <1452417098-28667-1-git-send-email-richard.dorsch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-01-10 10:44 ` kbuild test robot
0 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2016-01-10 10:44 UTC (permalink / raw)
Cc: kbuild-all-JC7UmRfGjtg, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
linux-gpio-u79uwXL29TY76Z2rM5mHXA,
lee.jones-QSEj5FYQhm4dnm+yROfE0A, jdelvare-IBi9RG/b67k,
linux-0h96xk9xTtrk1uMJSBkQmQ, wim-IQzOog9fTRqzQB+pC5nmwQ,
jo.sunga-ELdSlb/RfAS1Z/+hSey0Gg, Richard Vidal-Dorsch
drivers/video/backlight/imanager-bl.c:187: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
CC: Richard Vidal-Dorsch <richard.dorsch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
imanager-bl.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/video/backlight/imanager-bl.c
+++ b/drivers/video/backlight/imanager-bl.c
@@ -184,7 +184,6 @@ static int imanager_backlight_remove(str
static struct platform_driver imanager_backlight_driver = {
.driver = {
- .owner = THIS_MODULE,
.name = "imanager_backlight",
},
.probe = imanager_backlight_probe,
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-01-10 10:45 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-10 9:11 [PATCH v2 5/6] Add Advantech iManager Backlight driver richard.dorsch
2016-01-10 10:44 ` kbuild test robot
[not found] ` <1452417098-28667-1-git-send-email-richard.dorsch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-01-10 10:44 ` [PATCH] fix platform_no_drv_owner.cocci warnings kbuild test robot
-- strict thread matches above, loose matches on Subject: below --
2016-01-10 10:34 [PATCH v2 4/6] Add Advantech iManager I2C driver kbuild test robot
2016-01-10 9:11 ` richard.dorsch
2016-01-10 10:34 ` [PATCH] fix platform_no_drv_owner.cocci warnings kbuild test robot
2016-01-10 10:25 [PATCH v2 3/6] Add Advantech iManager HWmon driver kbuild test robot
2016-01-10 9:11 ` richard.dorsch
2016-01-10 10:25 ` [PATCH] fix platform_no_drv_owner.cocci warnings kbuild test robot
2016-01-10 10:11 [PATCH v2 1/6] Add Advantech iManager MFD core driver kbuild test robot
2016-01-10 9:10 ` richard.dorsch-Re5JQEeQqe8AvxtiuMwx3w
2016-01-10 10:11 ` [PATCH] fix platform_no_drv_owner.cocci warnings kbuild test robot
2016-01-09 2:02 [PATCH 6/6] Add Advantech iManager Watchdog driver kbuild test robot
[not found] ` <1452292166-20118-7-git-send-email-richard.dorsch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-01-09 2:02 ` [PATCH] fix platform_no_drv_owner.cocci warnings kbuild test robot
2016-01-09 0:50 [PATCH 2/6] Add Advantech iManager GPIO driver kbuild test robot
2016-01-08 22:29 ` richard.dorsch
2016-01-09 0:50 ` [PATCH] fix platform_no_drv_owner.cocci warnings kbuild test robot
[not found] <201503291519.K9Z6Qptb%fengguang.wu@intel.com>
2015-03-29 7:49 ` kbuild test robot
2015-03-30 13:05 ` Thierry Reding
2015-04-07 13:09 ` Linus Walleij
2015-04-08 1:24 ` Fengguang Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).