uio: Use Use of_match_ptr() macro in uio_pdrv_genirq.c
RFC PATCH 1/2 uio: Use Use of_match_ptr() macro in uio_pdrv_genirq.c
This eliminates having an #ifdef returning NULL for the case when OF is disabled.
--- drivers/uio/uio_pdrv_genirq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/uio/uio_pdrv_genirq.c +1 -3
@@ -267,8 +267,6 @@ static const struct of_device_id uio_of_genirq_match[] = { { /* empty for now */ }, };MODULE_DEVICE_TABLE (of, uio_of_genirq_match); -#else -# define uio_of_genirq_match NULL#endif static struct platform_driver uio_pdrv_genirq = {
@@ -278,7 +276,7 @@ static struct platform_driver uio_pdrv_genirq = { .name = DRIVER_NAME, .owner = THIS_MODULE, .pm = &uio_pdrv_genirq_dev_pm_ops, - .of_match_table = uio_of_genirq_match, + .of_match_table = of_match_ptr(uio_of_genirq_match), }, };
--
1.8.2.3
_______________________________________________
devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss
RFC PATCH 2/2 uio: Add two platform uio drivers to one
- Remove Userspace I/O platform driver without IRQ support but add this functionality to genirq driver
- Remove code duplication from OF binding
---
The main reason for this change is to have one compatibility string for UIO with and without IRQ.
--- drivers/uio/Kconfig | 7 --- drivers/uio/Makefile | 1 - drivers/uio/uio_pdrv.c | 113 ------------------------------------------ drivers/uio/uio_pdrv_genirq.c | 30 ++++------- 4 files changed, 9 insertions(+), 142 deletions(-) delete mode 100644 drivers/uio/uio_pdrv.c
drivers/uio/Kconfig +0 -7
@@ -23,13 +23,6 @@ config UIO_CIF To compile this driver as a module, choose M here: the module will be called uio_cif. -config UIO_PDRV - tristate "Userspace I/O platform driver" - help - Generic platform driver for Userspace I/O devices. - - If you don't know what to do here, say N. - config UIO_PDRV_GENIRQ tristate "Userspace I/O platform driver with generic IRQ handling" help
drivers/uio/Makefile +0 -1
@@ -1,6 +1,5 @@ obj-$(CONFIG_UIO) += uio.o obj-$(CONFIG_UIO_CIF) += uio_cif.o -obj-$(CONFIG_UIO_PDRV) += uio_pdrv.o obj-$(CONFIG_UIO_PDRV_GENIRQ) += uio_pdrv_genirq.o obj-$(CONFIG_UIO_DMEM_GENIRQ) += uio_dmem_genirq.o obj-$(CONFIG_UIO_AEC) += uio_aec.o
drivers/uio/uio_pdrv.c deleted +0 -113
113 lines not on this page · raw message
drivers/uio/uio_pdrv_genirq.c +9 -21
@@ -103,8 +103,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)int i;if (pdev->dev.of_node) { -int irq; -/* alloc uioinfo for one device */ uioinfo =kzalloc (sizeof (*uioinfo),GFP_KERNEL );if (!uioinfo) {
@@ -114,13 +112,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev) } uioinfo->name = pdev->dev.of_node->name; uioinfo->version ="devicetree" ; - -/* Multiple IRQs are not supported */ - irq =platform_get_irq (pdev,0 ); -if (irq == -ENXIO ) - uioinfo->irq =UIO_IRQ_NONE ; -else - uioinfo->irq = irq; }if (!uioinfo || !uioinfo->name || !uioinfo->version) {
@@ -146,14 +137,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev) priv->flags =0 ;/* interrupt is enabled to begin with */ priv->pdev = pdev; -if (!uioinfo->irq) { - ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (&pdev->dev,"failed to get IRQ\n" ); - goto bad0; - } - uioinfo->irq = ret; - } uiomem = &uioinfo->mem[0 ];for (i =0 ; i < pdev->num_resources; ++i) {
@@ -190,10 +173,15 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)* Interrupt sharing is not supported. */ - uioinfo->handler = uio_pdrv_genirq_handler; - uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol; - uioinfo->open = uio_pdrv_genirq_open; - uioinfo->release = uio_pdrv_genirq_release; + ret =platform_get_irq (pdev,0 ); +if (ret >=0 ) { + uioinfo->irq = ret; + uioinfo->handler = uio_pdrv_genirq_handler; + uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol; + uioinfo->open = uio_pdrv_genirq_open; + uioinfo->release = uio_pdrv_genirq_release; + } + uioinfo->priv = priv;/* Enable Runtime PM for this device:
--
1.8.2.3
Re: [RFC PATCH 2/2] uio: Add two platform uio drivers to one
Hi Hans,
any comment on this?
Thanks,
Michal
Quoted 230 lines · Michal Simek
- Remove Userspace I/O platform driver without IRQ support but add this functionality to genirq driver
- Remove code duplication from OF bindingSigned-off-by Michal Simek <[email protected]>---
The main reason for this change is to have one compatibility string for UIO with and without IRQ.--- drivers/uio/Kconfig | 7 --- drivers/uio/Makefile | 1 - drivers/uio/uio_pdrv.c | 113 ------------------------------------------ drivers/uio/uio_pdrv_genirq.c | 30 ++++------- 4 files changed, 9 insertions(+), 142 deletions(-) delete mode 100644 drivers/uio/uio_pdrv.cdrivers/uio/Kconfig +0
-7@@ -23,13 +23,6 @@ config UIO_CIF To compile this driver as a module, choose M here: the module will be called uio_cif. -config UIO_PDRV - tristate "Userspace I/O platform driver" - help - Generic platform driver for Userspace I/O devices. - - If you don't know what to do here, say N. - config UIO_PDRV_GENIRQ tristate "Userspace I/O platform driver with generic IRQ handling" helpdrivers/uio/Makefile +0
-1@@ -1,6 +1,5 @@ obj-$(CONFIG_UIO) += uio.o obj-$(CONFIG_UIO_CIF) += uio_cif.o -obj-$(CONFIG_UIO_PDRV) += uio_pdrv.o obj-$(CONFIG_UIO_PDRV_GENIRQ) += uio_pdrv_genirq.o obj-$(CONFIG_UIO_DMEM_GENIRQ) += uio_dmem_genirq.o obj-$(CONFIG_UIO_AEC) += uio_aec.odrivers/uio/uio_pdrv.c deleted +0
-113@@ -1,113 +0,0 @@ -/* -* drivers/uio/uio_pdrv.c -* -* Copyright (C) 2008 by Digi International Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License version 2 as published by -* the Free Software Foundation. -*/ -#include <linux/platform_device.h> -#include <linux/uio_driver.h> -#include <linux/stringify.h> -#include <linux/module.h> -#include <linux/slab.h> - -#define DRIVER_NAME "uio_pdrv" - -struct uio_platdata { -struct uio_info *uioinfo; -}; - -static int uio_pdrv_probe (struct platform_device *pdev) -{ -struct uio_info *uioinfo = pdev->dev.platform_data; -struct uio_platdata *pdata; -struct uio_mem *uiomem; -int ret = -ENODEV ; -int i; - -if (!uioinfo || !uioinfo->name || !uioinfo->version) { -dev_dbg (&pdev->dev,"%s: err_uioinfo\n" , __func__); - goto err_uioinfo; - } - - pdata =kzalloc (sizeof (*pdata),GFP_KERNEL ); -if (!pdata) { - ret = -ENOMEM ; -dev_dbg (&pdev->dev,"%s: err_alloc_pdata\n" , __func__); - goto err_alloc_pdata; - } - - pdata->uioinfo = uioinfo; - - uiomem = &uioinfo->mem[0 ]; - -for (i =0 ; i < pdev->num_resources; ++i) { -struct resource *r = &pdev->resource[i]; - -if (r->flags !=IORESOURCE_MEM ) -continue ; - -if (uiomem >= &uioinfo->mem[MAX_UIO_MAPS ]) { - dev_warn(&pdev->dev, "device has more than " - __stringify(MAX_UIO_MAPS) -" I/O memory resources.\n" ); -break ; - } - - uiomem->memtype =UIO_MEM_PHYS ; - uiomem->addr = r->start; - uiomem->size =resource_size (r); - uiomem->name = r->name; - ++uiomem; - } - -while (uiomem < &uioinfo->mem[MAX_UIO_MAPS ]) { - uiomem->size =0 ; - ++uiomem; - } - - pdata->uioinfo->priv = pdata; - - ret =uio_register_device (&pdev->dev, pdata->uioinfo); - -if (ret) { -kfree (pdata); -err_alloc_pdata: -err_uioinfo: -return ret; - } - -platform_set_drvdata (pdev, pdata); - -return 0 ; -} - -static int uio_pdrv_remove (struct platform_device *pdev) -{ -struct uio_platdata *pdata =platform_get_drvdata (pdev); - -uio_unregister_device (pdata->uioinfo); - -kfree (pdata); - -return 0 ; -} - -static struct platform_driver uio_pdrv = { - .probe = uio_pdrv_probe, - .remove = uio_pdrv_remove, - .driver = { - .name =DRIVER_NAME , - .owner =THIS_MODULE , - }, -}; - -module_platform_driver (uio_pdrv); - -MODULE_AUTHOR ("Uwe Kleine-Koenig" ); -MODULE_DESCRIPTION ("Userspace I/O platform driver" ); -MODULE_LICENSE ("GPL v2" ); -MODULE_ALIAS ("platform:" DRIVER_NAME );drivers/uio/uio_pdrv_genirq.c +9
-22@@ -103,8 +103,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)int i;if (pdev->dev.of_node) { -int irq; -/* alloc uioinfo for one device */ uioinfo =kzalloc (sizeof (*uioinfo),GFP_KERNEL );if (!uioinfo) {@@ -114,13 +112,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev) } uioinfo->name = pdev->dev.of_node->name; uioinfo->version ="devicetree" ; - -/* Multiple IRQs are not supported */ - irq =platform_get_irq (pdev,0 ); -if (irq == -ENXIO ) - uioinfo->irq =UIO_IRQ_NONE ; -else - uioinfo->irq = irq; }if (!uioinfo || !uioinfo->name || !uioinfo->version) {@@ -146,14 +137,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev) priv->flags =0 ;/* interrupt is enabled to begin with */ priv->pdev = pdev; -if (!uioinfo->irq) { - ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (&pdev->dev,"failed to get IRQ\n" ); - goto bad0; - } - uioinfo->irq = ret; - } uiomem = &uioinfo->mem[0 ];for (i =0 ; i < pdev->num_resources; ++i) {@@ -190,10 +173,15 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)* Interrupt sharing is not supported. */ - uioinfo->handler = uio_pdrv_genirq_handler; - uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol; - uioinfo->open = uio_pdrv_genirq_open; - uioinfo->release = uio_pdrv_genirq_release; + ret =platform_get_irq (pdev,0 ); +if (ret >=0 ) { + uioinfo->irq = ret; + uioinfo->handler = uio_pdrv_genirq_handler; + uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol; + uioinfo->open = uio_pdrv_genirq_open; + uioinfo->release = uio_pdrv_genirq_release; + } + uioinfo->priv = priv;/* Enable Runtime PM for this device: -- 1.8.2.3
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
Re: [RFC PATCH 2/2] uio: Add two platform uio drivers to one
Hi Hans and Greg,
can you please comment this?
Thanks,
Michal
Quoted 240 lines · Michal Simek
Hi Hans,
any comment on this?
Thanks,
MichalQuoted 230 lines · Michal Simek
- Remove Userspace I/O platform driver without IRQ support but add this functionality to genirq driver
- Remove code duplication from OF bindingSigned-off-by Michal Simek <[email protected]>---
The main reason for this change is to have one compatibility string for UIO with and without IRQ.--- drivers/uio/Kconfig | 7 --- drivers/uio/Makefile | 1 - drivers/uio/uio_pdrv.c | 113 ------------------------------------------ drivers/uio/uio_pdrv_genirq.c | 30 ++++------- 4 files changed, 9 insertions(+), 142 deletions(-) delete mode 100644 drivers/uio/uio_pdrv.cdrivers/uio/Kconfig +0
-7@@ -23,13 +23,6 @@ config UIO_CIF To compile this driver as a module, choose M here: the module will be called uio_cif. -config UIO_PDRV - tristate "Userspace I/O platform driver" - help - Generic platform driver for Userspace I/O devices. - - If you don't know what to do here, say N. - config UIO_PDRV_GENIRQ tristate "Userspace I/O platform driver with generic IRQ handling" helpdrivers/uio/Makefile +0
-1@@ -1,6 +1,5 @@ obj-$(CONFIG_UIO) += uio.o obj-$(CONFIG_UIO_CIF) += uio_cif.o -obj-$(CONFIG_UIO_PDRV) += uio_pdrv.o obj-$(CONFIG_UIO_PDRV_GENIRQ) += uio_pdrv_genirq.o obj-$(CONFIG_UIO_DMEM_GENIRQ) += uio_dmem_genirq.o obj-$(CONFIG_UIO_AEC) += uio_aec.odrivers/uio/uio_pdrv.c deleted +0
-113@@ -1,113 +0,0 @@ -/* -* drivers/uio/uio_pdrv.c -* -* Copyright (C) 2008 by Digi International Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License version 2 as published by -* the Free Software Foundation. -*/ -#include <linux/platform_device.h> -#include <linux/uio_driver.h> -#include <linux/stringify.h> -#include <linux/module.h> -#include <linux/slab.h> - -#define DRIVER_NAME "uio_pdrv" - -struct uio_platdata { -struct uio_info *uioinfo; -}; - -static int uio_pdrv_probe (struct platform_device *pdev) -{ -struct uio_info *uioinfo = pdev->dev.platform_data; -struct uio_platdata *pdata; -struct uio_mem *uiomem; -int ret = -ENODEV ; -int i; - -if (!uioinfo || !uioinfo->name || !uioinfo->version) { -dev_dbg (&pdev->dev,"%s: err_uioinfo\n" , __func__); - goto err_uioinfo; - } - - pdata =kzalloc (sizeof (*pdata),GFP_KERNEL ); -if (!pdata) { - ret = -ENOMEM ; -dev_dbg (&pdev->dev,"%s: err_alloc_pdata\n" , __func__); - goto err_alloc_pdata; - } - - pdata->uioinfo = uioinfo; - - uiomem = &uioinfo->mem[0 ]; - -for (i =0 ; i < pdev->num_resources; ++i) { -struct resource *r = &pdev->resource[i]; - -if (r->flags !=IORESOURCE_MEM ) -continue ; - -if (uiomem >= &uioinfo->mem[MAX_UIO_MAPS ]) { - dev_warn(&pdev->dev, "device has more than " - __stringify(MAX_UIO_MAPS) -" I/O memory resources.\n" ); -break ; - } - - uiomem->memtype =UIO_MEM_PHYS ; - uiomem->addr = r->start; - uiomem->size =resource_size (r); - uiomem->name = r->name; - ++uiomem; - } - -while (uiomem < &uioinfo->mem[MAX_UIO_MAPS ]) { - uiomem->size =0 ; - ++uiomem; - } - - pdata->uioinfo->priv = pdata; - - ret =uio_register_device (&pdev->dev, pdata->uioinfo); - -if (ret) { -kfree (pdata); -err_alloc_pdata: -err_uioinfo: -return ret; - } - -platform_set_drvdata (pdev, pdata); - -return 0 ; -} - -static int uio_pdrv_remove (struct platform_device *pdev) -{ -struct uio_platdata *pdata =platform_get_drvdata (pdev); - -uio_unregister_device (pdata->uioinfo); - -kfree (pdata); - -return 0 ; -} - -static struct platform_driver uio_pdrv = { - .probe = uio_pdrv_probe, - .remove = uio_pdrv_remove, - .driver = { - .name =DRIVER_NAME , - .owner =THIS_MODULE , - }, -}; - -module_platform_driver (uio_pdrv); - -MODULE_AUTHOR ("Uwe Kleine-Koenig" ); -MODULE_DESCRIPTION ("Userspace I/O platform driver" ); -MODULE_LICENSE ("GPL v2" ); -MODULE_ALIAS ("platform:" DRIVER_NAME );drivers/uio/uio_pdrv_genirq.c +9
-22@@ -103,8 +103,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)int i;if (pdev->dev.of_node) { -int irq; -/* alloc uioinfo for one device */ uioinfo =kzalloc (sizeof (*uioinfo),GFP_KERNEL );if (!uioinfo) {@@ -114,13 +112,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev) } uioinfo->name = pdev->dev.of_node->name; uioinfo->version ="devicetree" ; - -/* Multiple IRQs are not supported */ - irq =platform_get_irq (pdev,0 ); -if (irq == -ENXIO ) - uioinfo->irq =UIO_IRQ_NONE ; -else - uioinfo->irq = irq; }if (!uioinfo || !uioinfo->name || !uioinfo->version) {@@ -146,14 +137,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev) priv->flags =0 ;/* interrupt is enabled to begin with */ priv->pdev = pdev; -if (!uioinfo->irq) { - ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (&pdev->dev,"failed to get IRQ\n" ); - goto bad0; - } - uioinfo->irq = ret; - } uiomem = &uioinfo->mem[0 ];for (i =0 ; i < pdev->num_resources; ++i) {@@ -190,10 +173,15 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)* Interrupt sharing is not supported. */ - uioinfo->handler = uio_pdrv_genirq_handler; - uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol; - uioinfo->open = uio_pdrv_genirq_open; - uioinfo->release = uio_pdrv_genirq_release; + ret =platform_get_irq (pdev,0 ); +if (ret >=0 ) { + uioinfo->irq = ret; + uioinfo->handler = uio_pdrv_genirq_handler; + uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol; + uioinfo->open = uio_pdrv_genirq_open; + uioinfo->release = uio_pdrv_genirq_release; + } + uioinfo->priv = priv;/* Enable Runtime PM for this device: -- 1.8.2.3
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
Greg Kroah-Hartman
maintainerRe: [RFC PATCH 2/2] uio: Add two platform uio drivers to one
Quoted 3 lines · Michal Simek
Hi Hans and Greg,
can you please comment this?
I'll let Hans handle this, as he's the UIO maintainer now.
thanks,
greg -h
Re: [RFC PATCH 2/2] uio: Add two platform uio drivers to one
Quoted 7 lines · Greg Kroah-Hartman
Quoted 3 lines · Michal Simek
Hi Hans and Greg,
can you please comment this?
I'll let Hans handle this, as he's the UIO maintainer now.
Hans: Any update on this?
Thanks,
Michal
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
Re: [RFC PATCH 2/2] uio: Add two platform uio drivers to one
In reply to Greg Kroah-HartmanHi!
Quoted 3 lines
Quoted 1 line
can you please comment this?
I'll let Hans handle this, as he's the UIO maintainer now.
Looks good to me.
Anyway, Hans disappeared, so Greg takes patches, again. Take a look, it seems I already did some changes you wanted, they are in char-misc tree.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH 1/1 MAINTAINERS: Remove Hans J. Koch entries
Quoted 1 line · Pavel Machek
Anyway, Hans disappeared, so Greg takes patches, again.
Maybe this is appropriate then.
---
MAINTAINERS +1 -3
@@ -5253,9 +5253,8 @@ F: Documentation/hwmon/max16065 F: drivers/hwmon/max16065.c MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER -M: "Hans J. Koch" <[email protected]> L: [email protected] -S: Maintained +S: Orphan F: Documentation/hwmon/max6650 F: drivers/hwmon/max6650.c
@@ -8795,7 +8794,6 @@ F: fs/hostfs/ F: fs/hppfs/ USERSPACE I/O (UIO) -M: "Hans J. Koch" <[email protected]> M: Greg Kroah-Hartman <[email protected]> S: Maintained F: Documentation/DocBook/uio-howto.tmpl
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] MAINTAINERS: Remove Hans J. Koch entries
Quoted 12 lines · Joe Perches
Quoted 1 line · Pavel Machek
Anyway, Hans disappeared, so Greg takes patches, again.
Maybe this is appropriate then.
Signed-off-by Joe Perches <[email protected]>---
MAINTAINERS +0
-0
MAINTAINERS F: Documentation/hwmon/max16065 · line 5260
Quoted 10 lines
MAINTAINERS +1
-2@@ -5253,9 +5253,8 @@ F: Documentation/hwmon/max16065 F: drivers/hwmon/max16065.c MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER -M: "Hans J. Koch" <[email protected]> L: [email protected] -S: Maintained +S: Orphan F: Documentation/hwmon/max6650 F: drivers/hwmon/max6650.c
Please just drop that entry entirely, causing it to default to hwmon.
Thanks,
Guenter
Quoted 16 lines
MAINTAINERS +0
-1@@ -8795,7 +8794,6 @@ F: fs/hostfs/ F: fs/hppfs/ USERSPACE I/O (UIO) -M: "Hans J. Koch" <[email protected]> M: Greg Kroah-Hartman <[email protected]> S: Maintained F: Documentation/DocBook/uio-howto.tmpl_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] MAINTAINERS: Remove Hans J. Koch entries
Quoted 3 lines · Guenter Roeck
Quoted 2 lines · Joe Perches
Quoted 1 line · Pavel Machek
Anyway, Hans disappeared, so Greg takes patches, again.
[]
Quoted 9 lines
MAINTAINERS F: Documentation/hwmon/max16065 · line 5259
Quoted 8 lines
MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
MAINTAINERS +1
-2-M: "Hans J. Koch" <[email protected]> L: [email protected] -S: Maintained +S: Orphan F: Documentation/hwmon/max6650 F: drivers/hwmon/max6650.cPlease just drop that entry entirely, causing it to default to hwmon.
It was mostly a nudge for Hans.
Maybe in a few weeks if Hans doesn't reply that'd make sense.
I don't have any issue with marking specific files as orphan though. Orphan can help others identify files that might need care.
I just looked for the first time at max6650.c too. It's got a spirentcom copyright which amuses me.
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH] MAINTAINERS: Remove Hans J. Koch entries
In reply to Joe PerchesQuoted 2 lines · Joe Perches
Quoted 1 line · Pavel Machek
Anyway, Hans disappeared, so Greg takes patches, again.
I wasn't able to take part in kernel development because I was heavily involved in hardware development project. I always thought it would be just a few more days, but then it became half a year. I know I should have given an explanation and didn't. Sorry for that.
Quoted 10 lines
Maybe this is appropriate then.
Signed-off-by Joe Perches <[email protected]>---
MAINTAINERS +0
-0
MAINTAINERS F: Documentation/hwmon/max16065 · line 5259
Quoted 9 lines
MAINTAINERS +1
-2@@ -5253,9 +5253,8 @@ F: Documentation/hwmon/max16065 F: drivers/hwmon/max16065.c MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER -M: "Hans J. Koch" <[email protected]> L: [email protected] -S: Maintained +S: Orphan F: Documentation/hwmon/max6650 F: drivers/hwmon/max6650.c
ACK to that one. It was never my idea to have a MAINTAINERS entry for that. Jean Delvare suggested it, so it came in. The MAX6650 was in a project I was working on 6 years ago, and I wrote the driver at that time. Meanwhile, I don't even have hardware with a MAX6650 anymore.
Does each little driver really need a MAINTAINERS entry? In my opinion, it should only be there if it is clear that it's not just a short project work.
MAINTAINERS F: fs/hostfs/ · line 8799
Quoted 9 lines
MAINTAINERS +0
-1@@ -8795,7 +8794,6 @@ F: fs/hostfs/ F: fs/hppfs/ USERSPACE I/O (UIO) -M: "Hans J. Koch" <[email protected]> M: Greg Kroah-Hartman <[email protected]> S: Maintained F: Documentation/DocBook/uio-howto.tmpl
Well, you can do that if you want. But I still feel associated with UIO and sincerely hope I'm back again to fulfill my duties as a maintainer.
Thanks,
Hans
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH] MAINTAINERS: Remove Hans J. Koch entries
Quoted 1 line · Hans J. Koch
Does each little driver really need a
MAINTAINERSentry?
Hi Hans.
I think a lot of those driver MAINTAINERS entries are maybe a little useful when the driver is just written but are progressively less useful after a few months.
I once wrote a little script to look at whether or not each listed maintainer had signed-off on a patch to a listed file block for whatever time frame.
Most had not.
I'd rather people put their names in CREDITS than MAINTAINERS if they want posterity entries.
Quoted 2 lines
In my opinion, it should only be there if it is clear that it's not just a short project work.
I mostly agree with that, but sometimes it's useful when the implementation is a bit complex and the original author may still have some memory of the complexity.
Anyway, I'm not resubmitting that patch. If you want to remove yourself from whatever entry, please do.
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] MAINTAINERS: Remove Hans J. Koch entries
In reply to Hans J. KochHi Hans and all,
Quoted 8 lines · Hans J. Koch
Quoted 7 lines · Joe Perches
MAINTAINERS +0
-0@@ -5253,9 +5253,8 @@ F: Documentation/hwmon/max16065 F: drivers/hwmon/max16065.c
Quoted 12 lines
MAINTAINERS F: Documentation/hwmon/max16065 · line 5259
Quoted 7 lines
MAINTAINERS +1
-2MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER -M: "Hans J. Koch" <[email protected]> L: [email protected] -S: Maintained +S: Orphan F: Documentation/hwmon/max6650 F: drivers/hwmon/max6650.cACK to that one. It was never my idea to have a
MAINTAINERSentry for that. Jean Delvare suggested it, so it came in. The MAX6650 was in a project I was working on 6 years ago, and I wrote the driver at that time. Meanwhile, I don't even have hardware with a MAX6650 anymore.
Back then I was maintaining the hwmon subsystem all by myself and had way more than I could handle on my plate. Contributors kept complaining that I was too slow reviewing new drivers and having them add themselves to MAINTAINERS was my way to help them understand that Linux wasn't only about adding new driver, and that every piece of code added to the kernel had to be maintained by someone for the years to come. And that someone was rather them than me.
That being said, I agree it only makes sense for as long as the original contributor (or anyone else wanting to step in) has the hardware, interest and knowledge for the driver in question. After several years it makes sense to drop these individual driver entries if these conditions are no longer met.
Quoted 2 lines
Does each little driver really need a
MAINTAINERSentry? In my opinion, it should only be there if it is clear that it's not just a short project work.
The number of drivers in all kernel subsystems keeps growing, and hwmon is no exception. The number of subsystem maintainers, OTOH, is not growing, it's typically one or two persons doing all the work. This is why I value individual driver maintainers, as they help make it all scale. If existing drivers each have their own maintainer, subsystem maintainers can focus on subsystem-wide cleanups and reviewing new drivers.
But of course MAINTAINERS must reflect the reality and not my own fantasy world where every single driver would have a dedicated maintainer. If anyone listed as a driver maintainer in MAINTAINERS is not actually going to do the job for whatever reason, then the entry should be removed.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH] MAINTAINERS: Remove Hans J. Koch entries
In reply to Hans J. KochQuoted 41 lines · Hans J. Koch
Quoted 2 lines · Joe Perches
Quoted 1 line · Pavel Machek
Anyway, Hans disappeared, so Greg takes patches, again.
I wasn't able to take part in kernel development because I was heavily involved in hardware development project. I always thought it would be just a few more days, but then it became half a year. I know I should have given an explanation and didn't. Sorry for that.
Quoted 10 lines
Maybe this is appropriate then.
Signed-off-by Joe Perches <[email protected]>---
MAINTAINERS +0
-0MAINTAINERS F: Documentation/hwmon/max16065 · line 5259
Quoted 9 lines
MAINTAINERS +1
-2@@ -5253,9 +5253,8 @@ F: Documentation/hwmon/max16065 F: drivers/hwmon/max16065.c MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER -M: "Hans J. Koch" <[email protected]> L: [email protected] -S: Maintained +S: Orphan F: Documentation/hwmon/max6650 F: drivers/hwmon/max6650.cACK to that one. It was never my idea to have a
MAINTAINERSentry for that. Jean Delvare suggested it, so it came in. The MAX6650 was in a project I was working on 6 years ago, and I wrote the driver at that time. Meanwhile, I don't even have hardware with a MAX6650 anymore.Does each little driver really need a
MAINTAINERSentry? In my opinion, it should only be there if it is clear that it's not just a short project work.Quoted 4 lines
MAINTAINERS +0
-0@@ -8795,7 +8794,6 @@ F: fs/hostfs/ F: fs/hppfs/
Quoted 8 lines
MAINTAINERS F: fs/hostfs/ · line 8799
Quoted 5 lines
MAINTAINERS +0
-1USERSPACE I/O (UIO) -M: "Hans J. Koch" <[email protected]> M: Greg Kroah-Hartman <[email protected]> S: Maintained F: Documentation/DocBook/uio-howto.tmplWell, you can do that if you want. But I still feel associated with UIO and sincerely hope I'm back again to fulfill my duties as a maintainer.
ok then can you please comment my patches?
I think it is not necessary to have one driver which support UIO without IRQ and then second which support both cases.
Thanks,
Michal
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [RFC PATCH 2/2] uio: Add two platform uio drivers to one
In reply to Pavel MachekHi,
Quoted 11 lines · Pavel Machek
Hi!
Quoted 3 lines
Quoted 1 line
can you please comment this?
I'll let Hans handle this, as he's the UIO maintainer now.
Looks good to me.
Anyway, Hans disappeared, so Greg takes patches, again. Take a look, it seems I already did some changes you wanted, they are in char-misc tree.
Can you send me link to that repo?
Thanks,
Michal
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
Re: [RFC PATCH 2/2] uio: Add two platform uio drivers to one
Hi!
Quoted 11 lines
Quoted 9 lines
Quoted 3 lines
Quoted 1 line
can you please comment this?
I'll let Hans handle this, as he's the UIO maintainer now.
Looks good to me.
Anyway, Hans disappeared, so Greg takes patches, again. Take a look, it seems I already did some changes you wanted, they are in char-misc tree.
Can you send me link to that repo?
I googled a mirror...
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [RFC PATCH 2/2] uio: Add two platform uio drivers to one
Quoted 12 lines · Pavel Machek
Hi!
Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
Quoted 1 line
can you please comment this?
I'll let Hans handle this, as he's the UIO maintainer now.
Looks good to me.
Anyway, Hans disappeared, so Greg takes patches, again. Take a look, it seems I already did some changes you wanted, they are in char-misc tree.
Quoted 5 lines
Quoted 1 line
Can you send me link to that repo?
I googled a mirror...
Ok. I see.
Yeah it can be done in that way too.
I can rebase my patches on the top of that because they are still valid. 1/2 is not there and it is nice way how to simplify the code.
The purpose of 2/2 was to remove that uio_pdrv.c which is not needed when uio_pdrv_genirq.c also support no IRQ case.
Will be good if you can look at my patches and test them.
Also we should also simplify the driver by using devres groups, devm_kzalloc, etc.
Thanks,
Michal
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
Re: [RFC PATCH 2/2] uio: Add two platform uio drivers to one
In reply to Michal SimekHi Hans,
can you please look at this patch?
Thanks,
Michal
Quoted 230 lines · Michal Simek
- Remove Userspace I/O platform driver without IRQ support but add this functionality to genirq driver
- Remove code duplication from OF bindingSigned-off-by Michal Simek <[email protected]>---
The main reason for this change is to have one compatibility string for UIO with and without IRQ.--- drivers/uio/Kconfig | 7 --- drivers/uio/Makefile | 1 - drivers/uio/uio_pdrv.c | 113 ------------------------------------------ drivers/uio/uio_pdrv_genirq.c | 30 ++++------- 4 files changed, 9 insertions(+), 142 deletions(-) delete mode 100644 drivers/uio/uio_pdrv.cdrivers/uio/Kconfig +0
-7@@ -23,13 +23,6 @@ config UIO_CIF To compile this driver as a module, choose M here: the module will be called uio_cif. -config UIO_PDRV - tristate "Userspace I/O platform driver" - help - Generic platform driver for Userspace I/O devices. - - If you don't know what to do here, say N. - config UIO_PDRV_GENIRQ tristate "Userspace I/O platform driver with generic IRQ handling" helpdrivers/uio/Makefile +0
-1@@ -1,6 +1,5 @@ obj-$(CONFIG_UIO) += uio.o obj-$(CONFIG_UIO_CIF) += uio_cif.o -obj-$(CONFIG_UIO_PDRV) += uio_pdrv.o obj-$(CONFIG_UIO_PDRV_GENIRQ) += uio_pdrv_genirq.o obj-$(CONFIG_UIO_DMEM_GENIRQ) += uio_dmem_genirq.o obj-$(CONFIG_UIO_AEC) += uio_aec.odrivers/uio/uio_pdrv.c deleted +0
-113@@ -1,113 +0,0 @@ -/* -* drivers/uio/uio_pdrv.c -* -* Copyright (C) 2008 by Digi International Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License version 2 as published by -* the Free Software Foundation. -*/ -#include <linux/platform_device.h> -#include <linux/uio_driver.h> -#include <linux/stringify.h> -#include <linux/module.h> -#include <linux/slab.h> - -#define DRIVER_NAME "uio_pdrv" - -struct uio_platdata { -struct uio_info *uioinfo; -}; - -static int uio_pdrv_probe (struct platform_device *pdev) -{ -struct uio_info *uioinfo = pdev->dev.platform_data; -struct uio_platdata *pdata; -struct uio_mem *uiomem; -int ret = -ENODEV ; -int i; - -if (!uioinfo || !uioinfo->name || !uioinfo->version) { -dev_dbg (&pdev->dev,"%s: err_uioinfo\n" , __func__); - goto err_uioinfo; - } - - pdata =kzalloc (sizeof (*pdata),GFP_KERNEL ); -if (!pdata) { - ret = -ENOMEM ; -dev_dbg (&pdev->dev,"%s: err_alloc_pdata\n" , __func__); - goto err_alloc_pdata; - } - - pdata->uioinfo = uioinfo; - - uiomem = &uioinfo->mem[0 ]; - -for (i =0 ; i < pdev->num_resources; ++i) { -struct resource *r = &pdev->resource[i]; - -if (r->flags !=IORESOURCE_MEM ) -continue ; - -if (uiomem >= &uioinfo->mem[MAX_UIO_MAPS ]) { - dev_warn(&pdev->dev, "device has more than " - __stringify(MAX_UIO_MAPS) -" I/O memory resources.\n" ); -break ; - } - - uiomem->memtype =UIO_MEM_PHYS ; - uiomem->addr = r->start; - uiomem->size =resource_size (r); - uiomem->name = r->name; - ++uiomem; - } - -while (uiomem < &uioinfo->mem[MAX_UIO_MAPS ]) { - uiomem->size =0 ; - ++uiomem; - } - - pdata->uioinfo->priv = pdata; - - ret =uio_register_device (&pdev->dev, pdata->uioinfo); - -if (ret) { -kfree (pdata); -err_alloc_pdata: -err_uioinfo: -return ret; - } - -platform_set_drvdata (pdev, pdata); - -return 0 ; -} - -static int uio_pdrv_remove (struct platform_device *pdev) -{ -struct uio_platdata *pdata =platform_get_drvdata (pdev); - -uio_unregister_device (pdata->uioinfo); - -kfree (pdata); - -return 0 ; -} - -static struct platform_driver uio_pdrv = { - .probe = uio_pdrv_probe, - .remove = uio_pdrv_remove, - .driver = { - .name =DRIVER_NAME , - .owner =THIS_MODULE , - }, -}; - -module_platform_driver (uio_pdrv); - -MODULE_AUTHOR ("Uwe Kleine-Koenig" ); -MODULE_DESCRIPTION ("Userspace I/O platform driver" ); -MODULE_LICENSE ("GPL v2" ); -MODULE_ALIAS ("platform:" DRIVER_NAME );drivers/uio/uio_pdrv_genirq.c +9
-22@@ -103,8 +103,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)int i;if (pdev->dev.of_node) { -int irq; -/* alloc uioinfo for one device */ uioinfo =kzalloc (sizeof (*uioinfo),GFP_KERNEL );if (!uioinfo) {@@ -114,13 +112,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev) } uioinfo->name = pdev->dev.of_node->name; uioinfo->version ="devicetree" ; - -/* Multiple IRQs are not supported */ - irq =platform_get_irq (pdev,0 ); -if (irq == -ENXIO ) - uioinfo->irq =UIO_IRQ_NONE ; -else - uioinfo->irq = irq; }if (!uioinfo || !uioinfo->name || !uioinfo->version) {@@ -146,14 +137,6 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev) priv->flags =0 ;/* interrupt is enabled to begin with */ priv->pdev = pdev; -if (!uioinfo->irq) { - ret =platform_get_irq (pdev,0 ); -if (ret <0 ) { -dev_err (&pdev->dev,"failed to get IRQ\n" ); - goto bad0; - } - uioinfo->irq = ret; - } uiomem = &uioinfo->mem[0 ];for (i =0 ; i < pdev->num_resources; ++i) {@@ -190,10 +173,15 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)* Interrupt sharing is not supported. */ - uioinfo->handler = uio_pdrv_genirq_handler; - uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol; - uioinfo->open = uio_pdrv_genirq_open; - uioinfo->release = uio_pdrv_genirq_release; + ret =platform_get_irq (pdev,0 ); +if (ret >=0 ) { + uioinfo->irq = ret; + uioinfo->handler = uio_pdrv_genirq_handler; + uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol; + uioinfo->open = uio_pdrv_genirq_open; + uioinfo->release = uio_pdrv_genirq_release; + } + uioinfo->priv = priv;/* Enable Runtime PM for this device: -- 1.8.2.3
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform