All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] misc: move include files out of include/linux/i2c
@ 2017-05-21 20:42 Wolfram Sang
  2017-05-21 20:42 ` [PATCH 1/2] misc: apds990x: move header file out of I2C realm Wolfram Sang
  2017-05-21 20:42 ` [PATCH 2/2] misc: bh1770glc: " Wolfram Sang
  0 siblings, 2 replies; 9+ messages in thread
From: Wolfram Sang @ 2017-05-21 20:42 UTC (permalink / raw)
  To: linux-i2c; +Cc: Wolfram Sang, linux-kernel

It doesn't make sense to use include/linux/i2c for client drivers which may in
fact rather be hwmon or input or whatever devices. As a result, I want to
deprecate include/linux/i2c for good. This series moves the include files to a
better location, largely include/platform_data because that is what most of the
moved include files contain. Note that some files don't seem to have upstream
users in board code, so they maybe could even be removed? I didn't check for
that now, but I did it for one i2c master driver recently. So, it may be
possible.

I prefer the series to go upstream via the subsystem tree; if you prefer that I
take it via I2C, just let me know.

No runtime testing because of no HW, but buildbot is happy with this series at
least. A branch can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/platform_data

Thanks and kind regards,

   Wolfram


Wolfram Sang (2):
  misc: apds990x: move header file out of I2C realm
  misc: bh1770glc: move header file out of I2C realm

 drivers/misc/apds990x.c                          | 2 +-
 drivers/misc/bh1770glc.c                         | 2 +-
 include/linux/{i2c => platform_data}/apds990x.h  | 0
 include/linux/{i2c => platform_data}/bh1770glc.h | 0
 4 files changed, 2 insertions(+), 2 deletions(-)
 rename include/linux/{i2c => platform_data}/apds990x.h (100%)
 rename include/linux/{i2c => platform_data}/bh1770glc.h (100%)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] misc: apds990x: move header file out of I2C realm
  2017-05-21 20:42 [PATCH 0/2] misc: move include files out of include/linux/i2c Wolfram Sang
@ 2017-05-21 20:42 ` Wolfram Sang
  2017-05-22 14:29   ` Arnd Bergmann
  2017-05-21 20:42 ` [PATCH 2/2] misc: bh1770glc: " Wolfram Sang
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfram Sang @ 2017-05-21 20:42 UTC (permalink / raw)
  To: linux-i2c; +Cc: Wolfram Sang, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel

include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
 drivers/misc/apds990x.c                         | 2 +-
 include/linux/{i2c => platform_data}/apds990x.h | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename include/linux/{i2c => platform_data}/apds990x.h (100%)

diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c
index dfb72ecfa60461..c341164edaad01 100644
--- a/drivers/misc/apds990x.c
+++ b/drivers/misc/apds990x.c
@@ -32,7 +32,7 @@
 #include <linux/delay.h>
 #include <linux/wait.h>
 #include <linux/slab.h>
-#include <linux/i2c/apds990x.h>
+#include <linux/platform_data/apds990x.h>
 
 /* Register map */
 #define APDS990X_ENABLE	 0x00 /* Enable of states and interrupts */
diff --git a/include/linux/i2c/apds990x.h b/include/linux/platform_data/apds990x.h
similarity index 100%
rename from include/linux/i2c/apds990x.h
rename to include/linux/platform_data/apds990x.h
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] misc: bh1770glc: move header file out of I2C realm
  2017-05-21 20:42 [PATCH 0/2] misc: move include files out of include/linux/i2c Wolfram Sang
  2017-05-21 20:42 ` [PATCH 1/2] misc: apds990x: move header file out of I2C realm Wolfram Sang
@ 2017-05-21 20:42 ` Wolfram Sang
  1 sibling, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2017-05-21 20:42 UTC (permalink / raw)
  To: linux-i2c; +Cc: Wolfram Sang, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel

include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
 drivers/misc/bh1770glc.c                         | 2 +-
 include/linux/{i2c => platform_data}/bh1770glc.h | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename include/linux/{i2c => platform_data}/bh1770glc.h (100%)

diff --git a/drivers/misc/bh1770glc.c b/drivers/misc/bh1770glc.c
index 845466e45b9593..38fcfe219d1cf1 100644
--- a/drivers/misc/bh1770glc.c
+++ b/drivers/misc/bh1770glc.c
@@ -27,7 +27,7 @@
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/mutex.h>
-#include <linux/i2c/bh1770glc.h>
+#include <linux/platform_data/bh1770glc.h>
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
 #include <linux/workqueue.h>
diff --git a/include/linux/i2c/bh1770glc.h b/include/linux/platform_data/bh1770glc.h
similarity index 100%
rename from include/linux/i2c/bh1770glc.h
rename to include/linux/platform_data/bh1770glc.h
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] misc: apds990x: move header file out of I2C realm
  2017-05-21 20:42 ` [PATCH 1/2] misc: apds990x: move header file out of I2C realm Wolfram Sang
@ 2017-05-22 14:29   ` Arnd Bergmann
  2017-05-22 15:56     ` Wolfram Sang
  0 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2017-05-22 14:29 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, Greg Kroah-Hartman, Linux Kernel Mailing List

On Sun, May 21, 2017 at 10:42 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> include/linux/i2c is not for client devices. Move the header file to a
> more appropriate location.
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
>  drivers/misc/apds990x.c                         | 2 +-
>  include/linux/{i2c => platform_data}/apds990x.h | 0
>  2 files changed, 1 insertion(+), 1 deletion(-)
>  rename include/linux/{i2c => platform_data}/apds990x.h (100%)
>
> diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c
> index dfb72ecfa60461..c341164edaad01 100644
> --- a/drivers/misc/apds990x.c
> +++ b/drivers/misc/apds990x.c
> @@ -32,7 +32,7 @@
>  #include <linux/delay.h>
>  #include <linux/wait.h>
>  #include <linux/slab.h>
> -#include <linux/i2c/apds990x.h>
> +#include <linux/platform_data/apds990x.h>

The new location is clearly better than the old, but I notice that in both
patches, there is not a single definition for the platform_data structure
in the kernel and both drivers refuse to load when they do not get
passed valid platform_data.

Should we also remove the drivers or move them into staging?

       Arnd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] misc: apds990x: move header file out of I2C realm
  2017-05-22 14:29   ` Arnd Bergmann
@ 2017-05-22 15:56     ` Wolfram Sang
  2017-05-22 21:49       ` Arnd Bergmann
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfram Sang @ 2017-05-22 15:56 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-i2c, Greg Kroah-Hartman, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]

Hi Arnd,

> > -#include <linux/i2c/apds990x.h>
> > +#include <linux/platform_data/apds990x.h>
> 
> The new location is clearly better than the old, but I notice that in both
> patches, there is not a single definition for the platform_data structure
> in the kernel and both drivers refuse to load when they do not get
> passed valid platform_data.

Yes, this is true for quite some drivers I am moving around. I think
there are two reasons: a) the board code never made it upstream
b) DT conversion happened and platform_data is now cruft. As mentioned
in the cover-letter, I didn't dive deeper for all the drivers.

> Should we also remove the drivers or move them into staging?

I'd prefer to keep them. If they are needed again, DT conversion is
likely and easier than restarting from scratch. Guenter Roeck also
prefers to not unnecessarily annoy people who might have out-of-tree
board code. So, as long as they are not painful, let's keep them?

Regards,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] misc: apds990x: move header file out of I2C realm
  2017-05-22 15:56     ` Wolfram Sang
@ 2017-05-22 21:49       ` Arnd Bergmann
  2017-05-22 22:33         ` Linus Walleij
  2017-05-23  6:23         ` Wolfram Sang
  0 siblings, 2 replies; 9+ messages in thread
From: Arnd Bergmann @ 2017-05-22 21:49 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Greg Kroah-Hartman, Linux Kernel Mailing List, Linus Walleij

On Mon, May 22, 2017 at 5:56 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
>
>> Should we also remove the drivers or move them into staging?
>
> I'd prefer to keep them. If they are needed again, DT conversion is
> likely and easier than restarting from scratch. Guenter Roeck also
> prefers to not unnecessarily annoy people who might have out-of-tree
> board code. So, as long as they are not painful, let's keep them?

The one reason I can think of for removing them is that we don't
want ambient light sensor drivers in drivers/misc any more and
instead of adding DT probing code would also expect new users to
migrate to drivers/iio/light/, which already has drivers for
apds9300 and apds9960 but not apds990x, as well as bh1750 and
bh1780 but not bh1770.

       Arnd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] misc: apds990x: move header file out of I2C realm
  2017-05-22 21:49       ` Arnd Bergmann
@ 2017-05-22 22:33         ` Linus Walleij
  2017-05-25 23:22           ` Wolfram Sang
  2017-05-23  6:23         ` Wolfram Sang
  1 sibling, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2017-05-22 22:33 UTC (permalink / raw)
  To: Arnd Bergmann, Samu Onkalo
  Cc: Wolfram Sang, linux-i2c, Greg Kroah-Hartman, Linux Kernel Mailing List

On Mon, May 22, 2017 at 11:49 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Mon, May 22, 2017 at 5:56 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
>>
>>> Should we also remove the drivers or move them into staging?
>>
>> I'd prefer to keep them. If they are needed again, DT conversion is
>> likely and easier than restarting from scratch. Guenter Roeck also
>> prefers to not unnecessarily annoy people who might have out-of-tree
>> board code. So, as long as they are not painful, let's keep them?
>
> The one reason I can think of for removing them is that we don't
> want ambient light sensor drivers in drivers/misc any more and
> instead of adding DT probing code would also expect new users to
> migrate to drivers/iio/light/, which already has drivers for
> apds9300 and apds9960 but not apds990x, as well as bh1750 and
> bh1780 but not bh1770.

This (apds990x) and bh1770 were added by Samu Onkalo
for Nokia's upstreaming efforts.

Samu, what are the hardware targets using this? Something that
has a userspace etc that we can test?

Like Nokia 900 or so?

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] misc: apds990x: move header file out of I2C realm
  2017-05-22 21:49       ` Arnd Bergmann
  2017-05-22 22:33         ` Linus Walleij
@ 2017-05-23  6:23         ` Wolfram Sang
  1 sibling, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2017-05-23  6:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-i2c, Greg Kroah-Hartman, Linux Kernel Mailing List, Linus Walleij

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]


> The one reason I can think of for removing them is that we don't
> want ambient light sensor drivers in drivers/misc any more and
> instead of adding DT probing code would also expect new users to
> migrate to drivers/iio/light/, which already has drivers for
> apds9300 and apds9960 but not apds990x, as well as bh1750 and
> bh1780 but not bh1770.

Yes, I totally agree!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] misc: apds990x: move header file out of I2C realm
  2017-05-22 22:33         ` Linus Walleij
@ 2017-05-25 23:22           ` Wolfram Sang
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2017-05-25 23:22 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Arnd Bergmann, Samu Onkalo, linux-i2c, Greg Kroah-Hartman,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]


> > The one reason I can think of for removing them is that we don't
> > want ambient light sensor drivers in drivers/misc any more and
> > instead of adding DT probing code would also expect new users to
> > migrate to drivers/iio/light/, which already has drivers for
> > apds9300 and apds9960 but not apds990x, as well as bh1750 and
> > bh1780 but not bh1770.
> 
> This (apds990x) and bh1770 were added by Samu Onkalo
> for Nokia's upstreaming efforts.
> 
> Samu, what are the hardware targets using this? Something that
> has a userspace etc that we can test?
> 
> Like Nokia 900 or so?

The bh1770 seems to be used on the N950:
http://elinux.org/N950

I couldn't find a user of the apds990x.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-05-25 23:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-21 20:42 [PATCH 0/2] misc: move include files out of include/linux/i2c Wolfram Sang
2017-05-21 20:42 ` [PATCH 1/2] misc: apds990x: move header file out of I2C realm Wolfram Sang
2017-05-22 14:29   ` Arnd Bergmann
2017-05-22 15:56     ` Wolfram Sang
2017-05-22 21:49       ` Arnd Bergmann
2017-05-22 22:33         ` Linus Walleij
2017-05-25 23:22           ` Wolfram Sang
2017-05-23  6:23         ` Wolfram Sang
2017-05-21 20:42 ` [PATCH 2/2] misc: bh1770glc: " Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.