Add public w1 driver interface
Subsystems (5)
v3 cover Add public w1 driver interface
Hi All,
As part of continuing work to cleanup the BQ27xxx driver I am attempting to remove the need for the platform driver interface. For this we first need the w1 subsystem to act more like a traditional bus subsystem and allow drivers for attached devices to live outside of the w1 directory.
This should make no functional change, just a re-organization of header files.
Thanks,
Andrew
Changes from v2:
- Fix include path for out of directory references
Changes from v1:
- Dropped taken first two patches
- Added support for the new ds2438 chip driver
- Removed TI copywrite addition at maintainer's request
- Rebased on v4.12-rc1
Andrew F. Davis (1):
w1: Add subsystem kernel public interface
MAINTAINERS | 1 +
drivers/power/supply/ds2760_battery.c | 2 +-
drivers/power/supply/ds2780_battery.c | 2 +-
drivers/power/supply/ds2781_battery.c | 2 +-
drivers/w1/masters/ds1wm.c | 3 +-
drivers/w1/masters/ds2482.c | 3 +-
drivers/w1/masters/ds2490.c | 3 +-
drivers/w1/masters/matrox_w1.c | 3 +-
drivers/w1/masters/mxc_w1.c | 3 +-
drivers/w1/masters/omap_hdq.c | 3 +-
drivers/w1/masters/w1-gpio.c | 3 +-
drivers/w1/slaves/w1_bq27000.c | 6 +-
drivers/w1/slaves/w1_ds2405.c | 5 +-
drivers/w1/slaves/w1_ds2406.c | 6 +-
drivers/w1/slaves/w1_ds2408.c | 6 +-
drivers/w1/slaves/w1_ds2413.c | 6 +-
drivers/w1/slaves/w1_ds2423.c | 6 +-
drivers/w1/slaves/w1_ds2431.c | 6 +-
drivers/w1/slaves/w1_ds2433.c | 6 +-
drivers/w1/slaves/w1_ds2438.c | 5 +-
drivers/w1/slaves/w1_ds2760.c | 7 ++-
drivers/w1/slaves/w1_ds2780.c | 7 ++-
drivers/w1/slaves/w1_ds2781.c | 7 ++-
drivers/w1/slaves/w1_ds28e04.c | 6 +-
drivers/w1/slaves/w1_smem.c | 7 ++-
drivers/w1/slaves/w1_therm.c | 10 ++-
drivers/w1/w1.c | 6 +-
drivers/w1/w1_family.c | 3 +-
drivers/w1/w1_family.h | 98 -----------------------------
drivers/w1/w1_int.c | 3 +-
drivers/w1/w1_int.h | 27 --------
drivers/w1/w1_internal.h | 87 ++++++++++++++++++++++++++
drivers/w1/w1_io.c | 2 +-
drivers/w1/w1_netlink.c | 2 +-
drivers/w1/w1_netlink.h | 2 +-
{drivers/w1 => include/linux}/w1.h | 114 +++++++++++++++-------------------
36 files changed, 208 insertions(+), 260 deletions(-)
delete mode 100644 drivers/w1/w1_family.h
delete mode 100644 drivers/w1/w1_int.h
create mode 100644 drivers/w1/w1_internal.h
rename {drivers/w1 => include/linux}/w1.h (76%)Signature · 1 line
2.13.0
PATCH v3 1/1 w1: Add subsystem kernel public interface
Like other subsystems we should be able to define slave devices outside of the w1 directory. To do this we move public facing interface definitions to include/linux/w1.h and rename the internal definition file to w1_internal.h.
As w1_family.h and w1_int.h contained almost entirely public driver interface definitions we simply removed these files and moved the remaining definitions into w1_internal.h.
With this we can now start to move slave devices out of w1/slaves and into the subsystem based on the function they implement, again like other drivers.
---
MAINTAINERS | 1 +
drivers/power/supply/ds2760_battery.c | 2 +-
drivers/power/supply/ds2780_battery.c | 2 +-
drivers/power/supply/ds2781_battery.c | 2 +-
drivers/w1/masters/ds1wm.c | 3 +-
drivers/w1/masters/ds2482.c | 3 +-
drivers/w1/masters/ds2490.c | 3 +-
drivers/w1/masters/matrox_w1.c | 3 +-
drivers/w1/masters/mxc_w1.c | 3 +-
drivers/w1/masters/omap_hdq.c | 3 +-
drivers/w1/masters/w1-gpio.c | 3 +-
drivers/w1/slaves/w1_bq27000.c | 6 +-
drivers/w1/slaves/w1_ds2405.c | 5 +-
drivers/w1/slaves/w1_ds2406.c | 6 +-
drivers/w1/slaves/w1_ds2408.c | 6 +-
drivers/w1/slaves/w1_ds2413.c | 6 +-
drivers/w1/slaves/w1_ds2423.c | 6 +-
drivers/w1/slaves/w1_ds2431.c | 6 +-
drivers/w1/slaves/w1_ds2433.c | 6 +-
drivers/w1/slaves/w1_ds2438.c | 5 +-
drivers/w1/slaves/w1_ds2760.c | 7 ++-
drivers/w1/slaves/w1_ds2780.c | 7 ++-
drivers/w1/slaves/w1_ds2781.c | 7 ++-
drivers/w1/slaves/w1_ds28e04.c | 6 +-
drivers/w1/slaves/w1_smem.c | 7 ++-
drivers/w1/slaves/w1_therm.c | 10 ++-
drivers/w1/w1.c | 6 +-
drivers/w1/w1_family.c | 3 +-
drivers/w1/w1_family.h | 98 -----------------------------
drivers/w1/w1_int.c | 3 +-
drivers/w1/w1_int.h | 27 --------
drivers/w1/w1_internal.h | 87 ++++++++++++++++++++++++++
drivers/w1/w1_io.c | 2 +-
drivers/w1/w1_netlink.c | 2 +-
drivers/w1/w1_netlink.h | 2 +-
{drivers/w1 => include/linux}/w1.h | 114 +++++++++++++++-------------------
36 files changed, 208 insertions(+), 260 deletions(-)
delete mode 100644 drivers/w1/w1_family.h
delete mode 100644 drivers/w1/w1_int.h
create mode 100644 drivers/w1/w1_internal.h
rename {drivers/w1 => include/linux}/w1.h (76%)MAINTAINERS +1 -0
@@ -13766,6 +13766,7 @@ M: Evgeniy Polyakov <[email protected]> S: Maintained F: Documentation/w1/ F: drivers/w1/ +F: include/linux/w1.h W83791D HARDWARE MONITORING DRIVER M: Marc Hulsman <[email protected]>
drivers/power/supply/ds2760_battery.c +1 -1
@@ -28,7 +28,7 @@#include <linux/platform_device.h> #include <linux/power_supply.h> -#include "../../w1/w1.h" +#include <linux/w1.h> #include "../../w1/slaves/w1_ds2760.h" struct ds2760_device_info {
drivers/power/supply/ds2780_battery.c +1 -1
@@ -21,7 +21,7 @@#include <linux/power_supply.h> #include <linux/idr.h> -#include "../../w1/w1.h" +#include <linux/w1.h> #include "../../w1/slaves/w1_ds2780.h" /* Current unit measurement in uA for a 1 milli-ohm sense resistor */
drivers/power/supply/ds2781_battery.c +1 -1
@@ -19,7 +19,7 @@#include <linux/power_supply.h> #include <linux/idr.h> -#include "../../w1/w1.h" +#include <linux/w1.h> #include "../../w1/slaves/w1_ds2781.h" /* Current unit measurement in uA for a 1 milli-ohm sense resistor */
drivers/w1/masters/ds1wm.c +1 -2
@@ -25,8 +25,7 @@#include <asm/io.h> -#include "../w1.h" -#include "../w1_int.h" +#include <linux/w1.h> #define DS1WM_CMD 0x00/* R/W 4 bits command */
drivers/w1/masters/ds2482.c +1 -2
@@ -20,8 +20,7 @@#include <linux/delay.h> #include <asm/delay.h> -#include "../w1.h" -#include "../w1_int.h" +#include <linux/w1.h> /** * Allow the active pullup to be disabled, default is enabled.
drivers/w1/masters/ds2490.c +1 -2
@@ -25,8 +25,7 @@#include <linux/usb.h> #include <linux/slab.h> -#include "../w1_int.h" -#include "../w1.h" +#include <linux/w1.h> /* USB Standard */ /* USB Control request vendor type */
drivers/w1/masters/matrox_w1.c +1 -2
@@ -34,8 +34,7 @@#include <linux/pci_ids.h> #include <linux/pci.h> -#include "../w1.h" -#include "../w1_int.h" +#include <linux/w1.h> /* * Matrox G400 DDC registers.
drivers/w1/masters/mxc_w1.c +1 -2
@@ -19,8 +19,7 @@#include <linux/module.h> #include <linux/platform_device.h> -#include "../w1.h" -#include "../w1_int.h" +#include <linux/w1.h> /* * MXC W1 Register offsets
drivers/w1/masters/omap_hdq.c +1 -2
@@ -19,8 +19,7 @@#include <linux/pm_runtime.h> #include <linux/of.h> -#include "../w1.h" -#include "../w1_int.h" +#include <linux/w1.h> #define MOD_NAME "OMAP_HDQ:"
drivers/w1/masters/w1-gpio.c +1 -2
@@ -20,8 +20,7 @@#include <linux/of.h> #include <linux/delay.h> -#include "../w1.h" -#include "../w1_int.h" +#include <linux/w1.h> static u8 w1_gpio_set_pullup (void *data,int delay) {
drivers/w1/slaves/w1_bq27000.c +3 -3
@@ -17,9 +17,9 @@#include <linux/mutex.h> #include <linux/power/bq27xxx_battery.h> -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> + +#define W1_FAMILY_BQ27000 0x01#define HDQ_CMD_READ (0)#define HDQ_CMD_WRITE (1<<7)
drivers/w1/slaves/w1_ds2405.c +3 -2
@@ -24,8 +24,9 @@#include <linux/string.h> #include <linux/types.h> -#include "../w1.h" -#include "../w1_family.h" +#include <linux/w1.h> + +#define W1_FAMILY_DS2405 0x05MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Maciej S. Szmigiero <[email protected]>" );
drivers/w1/slaves/w1_ds2406.c +3 -3
@@ -17,9 +17,9 @@#include <linux/slab.h> #include <linux/crc16.h> -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> + +#define W1_FAMILY_DS2406 0x12#define W1_F12_FUNC_READ_STATUS 0xAA#define W1_F12_FUNC_WRITE_STATUS 0x55
drivers/w1/slaves/w1_ds2408.c +3 -3
@@ -15,9 +15,9 @@#include <linux/delay.h> #include <linux/slab.h> -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> + +#define W1_FAMILY_DS2408 0x29#define W1_F29_RETRIES 3
drivers/w1/slaves/w1_ds2413.c +3 -3
@@ -16,9 +16,9 @@#include <linux/delay.h> #include <linux/slab.h> -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> + +#define W1_FAMILY_DS2413 0x3A#define W1_F3A_RETRIES 3#define W1_F3A_FUNC_PIO_ACCESS_READ 0xF5
drivers/w1/slaves/w1_ds2423.c +3 -3
@@ -30,9 +30,9 @@#include <linux/delay.h> #include <linux/crc16.h> -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> + +#define W1_COUNTER_DS2423 0x1D#define CRC16_VALID 0xb001#define CRC16_INIT 0
drivers/w1/slaves/w1_ds2431.c +3 -3
@@ -16,9 +16,9 @@#include <linux/types.h> #include <linux/delay.h> -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> + +#define W1_EEPROM_DS2431 0x2D#define W1_F2D_EEPROM_SIZE 128#define W1_F2D_PAGE_COUNT 4
drivers/w1/slaves/w1_ds2433.c +3 -3
@@ -22,9 +22,9 @@#endif -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> + +#define W1_EEPROM_DS2433 0x23#define W1_EEPROM_SIZE 512#define W1_PAGE_COUNT 16
drivers/w1/slaves/w1_ds2438.c +3 -2
@@ -13,8 +13,9 @@#include <linux/types.h> #include <linux/delay.h> -#include "../w1.h" -#include "../w1_family.h" +#include <linux/w1.h> + +#define W1_FAMILY_DS2438 0x26#define W1_DS2438_RETRIES 3
drivers/w1/slaves/w1_ds2760.c +4 -3
@@ -18,11 +18,12 @@#include <linux/idr.h> #include <linux/gfp.h> -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> +#include "w1_ds2760.h" +#define W1_FAMILY_DS2760 0x30 +static int w1_ds2760_io (struct device *dev,char *buf,int addr,size_t count,int io) {
drivers/w1/slaves/w1_ds2780.c +4 -3
@@ -21,11 +21,12 @@#include <linux/mutex.h> #include <linux/idr.h> -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> +#include "w1_ds2780.h" +#define W1_FAMILY_DS2780 0x32 +static int w1_ds2780_do_io (struct device *dev,char *buf,int addr,size_t count,int io) {
drivers/w1/slaves/w1_ds2781.c +4 -3
@@ -18,11 +18,12 @@#include <linux/platform_device.h> #include <linux/mutex.h> -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> +#include "w1_ds2781.h" +#define W1_FAMILY_DS2781 0x3D +static int w1_ds2781_do_io (struct device *dev,char *buf,int addr,size_t count,int io) {
drivers/w1/slaves/w1_ds28e04.c +3 -3
@@ -20,9 +20,9 @@#define CRC16_INIT 0#define CRC16_VALID 0xb001 -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> + +#define W1_FAMILY_DS28E04 0x1C/* Allow the strong pullup to be disabled, but default to enabled. * If it was disabled a parasite powered device might not get the required
drivers/w1/slaves/w1_smem.c +4 -3
@@ -27,9 +27,10 @@#include <linux/device.h> #include <linux/types.h> -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> + +#define W1_FAMILY_SMEM_01 0x01 +#define W1_FAMILY_SMEM_81 0x81static struct w1_family w1_smem_family_01 = { .fid =W1_FAMILY_SMEM_01 ,
drivers/w1/slaves/w1_therm.c +7 -3
@@ -30,9 +30,13 @@#include <linux/slab.h> #include <linux/delay.h> -#include "../w1.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include <linux/w1.h> + +#define W1_THERM_DS18S20 0x10 +#define W1_THERM_DS1822 0x22 +#define W1_THERM_DS18B20 0x28 +#define W1_THERM_DS1825 0x3B +#define W1_THERM_DS28EA00 0x42/* Allow the strong pullup to be disabled, but default to enabled. * If it was disabled a parasite powered device might not get the require
drivers/w1/w1.c +3 -3
@@ -28,11 +28,11 @@#include <linux/atomic.h> -#include "w1.h" -#include "w1_int.h" -#include "w1_family.h" +#include "w1_internal.h" #include "w1_netlink.h" +#define W1_FAMILY_DEFAULT 0 +static int w1_timeout =10 ;module_param_named (timeout, w1_timeout, int,0 );MODULE_PARM_DESC (timeout,"time in seconds between automatic slave searches" );
drivers/w1/w1_family.c +1 -2
@@ -18,8 +18,7 @@#include <linux/delay.h> #include <linux/export.h> -#include "w1_family.h" -#include "w1.h" +#include "w1_internal.h" DEFINE_SPINLOCK (w1_flock);static LIST_HEAD (w1_families);
drivers/w1/w1_family.h deleted +0 -98
98 lines not on this page · raw message
drivers/w1/w1_int.c +1 -2
@@ -21,9 +21,8 @@#include <linux/export.h> #include <linux/moduleparam.h> -#include "w1.h" +#include "w1_internal.h" #include "w1_netlink.h" -#include "w1_int.h" static int w1_search_count =-1 ;/* Default is continual scan */ module_param_named (search_count, w1_search_count, int,0 );
drivers/w1/w1_int.h deleted +0 -27
@@ -1,27 +0,0 @@ -/* -* Copyright (c) 2004 Evgeniy Polyakov <[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. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -*/ - -#ifndef __W1_INT_H -#define __W1_INT_H - -#include <linux/kernel.h> -#include <linux/device.h> - -#include "w1.h" - -int w1_add_master_device (struct w1_bus_master *); -void w1_remove_master_device (struct w1_bus_master *); -void __w1_remove_master_device (struct w1_master *); - -#endif /* __W1_INT_H */
drivers/w1/w1_internal.h new file +87 -0
87 lines not on this page · raw message
drivers/w1/w1_io.c +1 -1
@@ -18,7 +18,7 @@#include <linux/moduleparam.h> #include <linux/module.h> -#include "w1.h" +#include "w1_internal.h" static int w1_delay_parm =1 ;module_param_named (delay_coef, w1_delay_parm, int,0 );
drivers/w1/w1_netlink.c +1 -1
@@ -17,7 +17,7 @@#include <linux/netlink.h> #include <linux/connector.h> -#include "w1.h" +#include "w1_internal.h" #include "w1_netlink.h" #if defined(CONFIG_W1_CON ) && (defined(CONFIG_CONNECTOR ) || (defined(CONFIG_CONNECTOR_MODULE ) && defined(CONFIG_W1_MODULE )))
drivers/w1/w1_netlink.h +1 -1
@@ -18,7 +18,7 @@#include <asm/types.h> #include <linux/connector.h> -#include "w1.h" +#include "w1_internal.h" /** * enum w1_cn_msg_flags - bitfield flags for struct cn_msg.flags
include/linux/w1.h renamed from drivers/w1/w1.h +49 -65
178 lines not on this page · raw message
Signature · 1 line
2.13.0
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH v3 1/1] w1: Add subsystem kernel public interface
Hi,
Quoted 14 lines · Evgeniy Polyakov
05.06.2017, 16:52, "Andrew F. Davis" <[email protected]>:
Quoted 13 lines
Like other subsystems we should be able to define slave devices outside of the w1 directory. To do this we move public facing interface definitions to
include/linux/w1.hand rename the internal definition file tow1_internal.h.As
w1_family.handw1_int.hcontained almost entirely public driver interface definitions we simply removed these files and moved the remaining definitions intow1_internal.h.With this we can now start to move slave devices out of w1/slaves and into the subsystem based on the function they implement, again like other drivers.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Sebastian Reichel <[email protected]>Thank you, looks good to me.
Acked-by Evgeniy Polyakov <[email protected]>Greg, please pull it into your tree
It would be nice, if I can get an immutable branch for the power-supply subsystem to ease merge process of MAX1721x driver.
-- Sebastian
Re: [PATCH v3 1/1] w1: Add subsystem kernel public interface
Quoted 22 lines · Sebastian Reichel
Hi,
Quoted 19 lines · Evgeniy Polyakov
05.06.2017, 16:52, "Andrew F. Davis" <[email protected]>:
Quoted 9 lines
Like other subsystems we should be able to define slave devices outside of the w1 directory. To do this we move public facing interface definitions to
include/linux/w1.hand rename the internal definition file tow1_internal.h.As
w1_family.handw1_int.hcontained almost entirely public driver interface definitions we simply removed these files and moved the remaining definitions intow1_internal.h.Quoted 6 lines
With this we can now start to move slave devices out of w1/slaves and into the subsystem based on the function they implement, again like other drivers.
Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Sebastian Reichel <[email protected]>Thank you, looks good to me.
Quoted 7 lines
Quoted 3 lines
Acked-by Evgeniy Polyakov <[email protected]>Greg, please pull it into your tree
It would be nice, if I can get an immutable branch for the power-supply subsystem to ease merge process of MAX1721x driver.
Once it moves into my char-misc-next branch, it will be immutable. Give it a day or so...
thanks,
greg k-h
Re: [PATCH v3 1/1] w1: Add subsystem kernel public interface
In reply to Andrew F. DavisQuoted 50 lines · Andrew F. Davis
Like other subsystems we should be able to define slave devices outside of the w1 directory. To do this we move public facing interface definitions to
include/linux/w1.hand rename the internal definition file tow1_internal.h.As
w1_family.handw1_int.hcontained almost entirely public driver interface definitions we simply removed these files and moved the remaining definitions intow1_internal.h.With this we can now start to move slave devices out of w1/slaves and into the subsystem based on the function they implement, again like other drivers.
Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Sebastian Reichel <[email protected]>Acked-by Evgeniy Polyakov <[email protected]>--- MAINTAINERS | 1 + drivers/power/supply/ds2760_battery.c | 2 +- drivers/power/supply/ds2780_battery.c | 2 +- drivers/power/supply/ds2781_battery.c | 2 +- drivers/w1/masters/ds1wm.c | 3 +- drivers/w1/masters/ds2482.c | 3 +- drivers/w1/masters/ds2490.c | 3 +- drivers/w1/masters/matrox_w1.c | 3 +- drivers/w1/masters/mxc_w1.c | 3 +- drivers/w1/masters/omap_hdq.c | 3 +- drivers/w1/masters/w1-gpio.c | 3 +- drivers/w1/slaves/w1_bq27000.c | 6 +- drivers/w1/slaves/w1_ds2405.c | 5 +- drivers/w1/slaves/w1_ds2406.c | 6 +- drivers/w1/slaves/w1_ds2408.c | 6 +- drivers/w1/slaves/w1_ds2413.c | 6 +- drivers/w1/slaves/w1_ds2423.c | 6 +- drivers/w1/slaves/w1_ds2431.c | 6 +- drivers/w1/slaves/w1_ds2433.c | 6 +- drivers/w1/slaves/w1_ds2438.c | 5 +- drivers/w1/slaves/w1_ds2760.c | 7 ++- drivers/w1/slaves/w1_ds2780.c | 7 ++- drivers/w1/slaves/w1_ds2781.c | 7 ++- drivers/w1/slaves/w1_ds28e04.c | 6 +- drivers/w1/slaves/w1_smem.c | 7 ++- drivers/w1/slaves/w1_therm.c | 10 ++- drivers/w1/w1.c | 6 +- drivers/w1/w1_family.c | 3 +- drivers/w1/w1_family.h | 98 ----------------------------- drivers/w1/w1_int.c | 3 +- drivers/w1/w1_int.h | 27 -------- drivers/w1/w1_internal.h | 87 ++++++++++++++++++++++++++ drivers/w1/w1_io.c | 2 +-
Quoted 8 lines
drivers/w1/w1_netlink.c | 2 +-
drivers/w1/w1_netlink.h | 2 +-
{drivers/w1 => include/linux}/w1.h | 114 +++++++++++++++-------------------
36 files changed, 208 insertions(+), 260 deletions(-)
delete mode 100644 drivers/w1/w1_family.h
delete mode 100644 drivers/w1/w1_int.h
create mode 100644 drivers/w1/w1_internal.h
rename {drivers/w1 => include/linux}/w1.h (76%)You forgot to update Documentation/DocBook/w1.tmpl, and now the documentation build breaks :(
Can you please send me a patch to fix that up?
thanks,
greg k-h
Re: [PATCH v3 1/1] w1: Add subsystem kernel public interface
Quoted 60 lines · Greg Kroah-Hartman
Quoted 50 lines · Andrew F. Davis
Like other subsystems we should be able to define slave devices outside of the w1 directory. To do this we move public facing interface definitions to
include/linux/w1.hand rename the internal definition file tow1_internal.h.As
w1_family.handw1_int.hcontained almost entirely public driver interface definitions we simply removed these files and moved the remaining definitions intow1_internal.h.With this we can now start to move slave devices out of w1/slaves and into the subsystem based on the function they implement, again like other drivers.
Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Sebastian Reichel <[email protected]>Acked-by Evgeniy Polyakov <[email protected]>--- MAINTAINERS | 1 + drivers/power/supply/ds2760_battery.c | 2 +- drivers/power/supply/ds2780_battery.c | 2 +- drivers/power/supply/ds2781_battery.c | 2 +- drivers/w1/masters/ds1wm.c | 3 +- drivers/w1/masters/ds2482.c | 3 +- drivers/w1/masters/ds2490.c | 3 +- drivers/w1/masters/matrox_w1.c | 3 +- drivers/w1/masters/mxc_w1.c | 3 +- drivers/w1/masters/omap_hdq.c | 3 +- drivers/w1/masters/w1-gpio.c | 3 +- drivers/w1/slaves/w1_bq27000.c | 6 +- drivers/w1/slaves/w1_ds2405.c | 5 +- drivers/w1/slaves/w1_ds2406.c | 6 +- drivers/w1/slaves/w1_ds2408.c | 6 +- drivers/w1/slaves/w1_ds2413.c | 6 +- drivers/w1/slaves/w1_ds2423.c | 6 +- drivers/w1/slaves/w1_ds2431.c | 6 +- drivers/w1/slaves/w1_ds2433.c | 6 +- drivers/w1/slaves/w1_ds2438.c | 5 +- drivers/w1/slaves/w1_ds2760.c | 7 ++- drivers/w1/slaves/w1_ds2780.c | 7 ++- drivers/w1/slaves/w1_ds2781.c | 7 ++- drivers/w1/slaves/w1_ds28e04.c | 6 +- drivers/w1/slaves/w1_smem.c | 7 ++- drivers/w1/slaves/w1_therm.c | 10 ++- drivers/w1/w1.c | 6 +- drivers/w1/w1_family.c | 3 +- drivers/w1/w1_family.h | 98 ----------------------------- drivers/w1/w1_int.c | 3 +- drivers/w1/w1_int.h | 27 -------- drivers/w1/w1_internal.h | 87 ++++++++++++++++++++++++++ drivers/w1/w1_io.c | 2 +-Quoted 8 lines
drivers/w1/w1_netlink.c | 2 +- drivers/w1/w1_netlink.h | 2 +- {drivers/w1 => include/linux}/w1.h | 114 +++++++++++++++------------------- 36 files changed, 208 insertions(+), 260 deletions(-) delete mode 100644 drivers/w1/w1_family.h delete mode 100644 drivers/w1/w1_int.h create mode 100644 drivers/w1/w1_internal.h rename {drivers/w1 => include/linux}/w1.h (76%)
Quoted 4 lines
You forgot to update
Documentation/DocBook/w1.tmpl, and now the documentation build breaks :(Can you please send me a patch to fix that up?
It looks like in -next DocBook/w1.tmpl has been converted to driver-api/w1.rst, should I just fix up the .rst version, or would you also like a patch for your tree to keep it building for now?
Thanks,
Andrew
Quoted 5 lines
thanks,
greg k-h
Re: [PATCH v3 1/1] w1: Add subsystem kernel public interface
Quoted 61 lines · Andrew F. Davis
Quoted 60 lines · Greg Kroah-Hartman
Quoted 58 lines · Andrew F. Davis
Like other subsystems we should be able to define slave devices outside of the w1 directory. To do this we move public facing interface definitions to
include/linux/w1.hand rename the internal definition file tow1_internal.h.As
w1_family.handw1_int.hcontained almost entirely public driver interface definitions we simply removed these files and moved the remaining definitions intow1_internal.h.With this we can now start to move slave devices out of w1/slaves and into the subsystem based on the function they implement, again like other drivers.
Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Sebastian Reichel <[email protected]>Acked-by Evgeniy Polyakov <[email protected]>--- MAINTAINERS | 1 + drivers/power/supply/ds2760_battery.c | 2 +- drivers/power/supply/ds2780_battery.c | 2 +- drivers/power/supply/ds2781_battery.c | 2 +- drivers/w1/masters/ds1wm.c | 3 +- drivers/w1/masters/ds2482.c | 3 +- drivers/w1/masters/ds2490.c | 3 +- drivers/w1/masters/matrox_w1.c | 3 +- drivers/w1/masters/mxc_w1.c | 3 +- drivers/w1/masters/omap_hdq.c | 3 +- drivers/w1/masters/w1-gpio.c | 3 +- drivers/w1/slaves/w1_bq27000.c | 6 +- drivers/w1/slaves/w1_ds2405.c | 5 +- drivers/w1/slaves/w1_ds2406.c | 6 +- drivers/w1/slaves/w1_ds2408.c | 6 +- drivers/w1/slaves/w1_ds2413.c | 6 +- drivers/w1/slaves/w1_ds2423.c | 6 +- drivers/w1/slaves/w1_ds2431.c | 6 +- drivers/w1/slaves/w1_ds2433.c | 6 +- drivers/w1/slaves/w1_ds2438.c | 5 +- drivers/w1/slaves/w1_ds2760.c | 7 ++- drivers/w1/slaves/w1_ds2780.c | 7 ++- drivers/w1/slaves/w1_ds2781.c | 7 ++- drivers/w1/slaves/w1_ds28e04.c | 6 +- drivers/w1/slaves/w1_smem.c | 7 ++- drivers/w1/slaves/w1_therm.c | 10 ++- drivers/w1/w1.c | 6 +- drivers/w1/w1_family.c | 3 +- drivers/w1/w1_family.h | 98 ----------------------------- drivers/w1/w1_int.c | 3 +- drivers/w1/w1_int.h | 27 -------- drivers/w1/w1_internal.h | 87 ++++++++++++++++++++++++++ drivers/w1/w1_io.c | 2 +- drivers/w1/w1_netlink.c | 2 +- drivers/w1/w1_netlink.h | 2 +- {drivers/w1 => include/linux}/w1.h | 114 +++++++++++++++------------------- 36 files changed, 208 insertions(+), 260 deletions(-) delete mode 100644 drivers/w1/w1_family.h delete mode 100644 drivers/w1/w1_int.h create mode 100644 drivers/w1/w1_internal.h rename {drivers/w1 => include/linux}/w1.h (76%)
Quoted 8 lines
Quoted 4 lines
You forgot to update
Documentation/DocBook/w1.tmpl, and now the documentation build breaks :(Can you please send me a patch to fix that up?
It looks like in -next DocBook/w1.tmpl has been converted to
driver-api/w1.rst, should I just fix up the .rst version, or would you also like a patch for your tree to keep it building for now?
Fixing up my tree would be best for now.
We can handle the merge issue if it happens afterward.
thanks,
greg k-h
PATCH 1/1 DocBook: w1: Update W1 file locations and names in DocBook
Some of the files in the W1 subsystem have been moved or renamed, update the documentation for the same.
--- Documentation/DocBook/w1.tmpl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
Documentation/DocBook/w1.tmpl +9 -9
@@ -51,9 +51,9 @@ <sect1 id="w1_internal_api"> <title>W1 API internal to the kernel</title> <sect2 id="w1.h"> - <title>drivers/w1/w1.h</title> - <para>W1 core functions.</para> -!Idrivers/w1/w1.h + <title>include/linux/w1.h</title> + <para>W1 kernel API functions.</para> +!Iinclude/linux/w1.h </sect2> <sect2 id="w1.c">
@@ -62,18 +62,18 @@ !Idrivers/w1/w1.c </sect2> - <sect2 id="w1_family.h"> - <title>drivers/w1/w1_family.h</title> - <para>Allows registering device family operations.</para> -!Idrivers/w1/w1_family.h - </sect2> - <sect2 id="w1_family.c"> <title>drivers/w1/w1_family.c</title> <para>Allows registering device family operations.</para> !Edrivers/w1/w1_family.c </sect2> + <sect2 id="w1_internal.h"> + <title>drivers/w1/w1_internal.h</title> + <para>W1 internal initialization for master devices.</para> +!Idrivers/w1/w1_internal.h + </sect2> + <sect2 id="w1_int.c"> <title>drivers/w1/w1_int.c</title> <para>W1 internal initialization for master devices.</para>
Signature · 1 line
2.13.0
kbuild test robot
build botRe: [PATCH] DocBook: w1: Update W1 file locations and names in DocBook
url: https://github.com/0day-ci/linux/commits/Andrew-F-Davis/DocBook-w1-Update-W1-file-locations-and-names-in-DocBook/20170613-035424 reproduce: make htmldocs
Hi Andrew,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc5]
[cannot apply to next-20170609]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Andrew-F-Davis/DocBook-w1-Update-W1-file-locations-and-names-in-DocBook/20170613-035424
reproduce: make htmldocs
All errors (new ones prefixed by >>):
>> docproc: include/linux/w1.h: No such file or directory
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation