[PATCH v3 3/3] net: dsa: mv88e6xxx: add switchdev VLAN operations

2015-07-05 Thread Vivien Didelot
4 10 PVID Egress Untagged swp4 10 PVID Egress Untagged br0 None This calls port_vlan_dump() for each ports. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6123_61_65.c | 3 + drivers/net/dsa/mv88e6131.c | 3 + drivers/net/dsa/mv88e6171.c | 3 + drive

[PATCH v3 1/3] net: dsa: mv88e6xxx: add debugfs interface for VTU

2015-07-05 Thread Vivien Didelot
at: echo 1300 1312 0 x x t x t t x > vtu and can be deleted by echoing only the VID: echo 1000 > vtu Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 311 drivers/net/dsa/mv88e6xxx.h | 24 2 files changed, 335 i

[PATCH v3 0/3] net: dsa: mv88e6xxx: add support for VLAN Table Unit

2015-07-05 Thread Vivien Didelot
is the CPU port, the "vtu" debugfs file would show: # cat /sys/kernel/debug/dsa0/vtu VID FID SID 0 1 2 3 4 5 6 550 550 0x x x u x t x 1000 1000 0x x t x x t x 1200 1200 0x x t x t t x Cheers, -v Vivien Didelot (3): net: d

[PATCH v3 2/3] net: dsa: add support for switchdev VLAN objects

2015-07-05 Thread Vivien Didelot
This patch adds the glue between DSA and switchdev operations to add, delete and dump SWITCHDEV_OBJ_PORT_VLAN objects. This is a first step to link the "bridge vlan" command with hardware entries for DSA compatible switch chips. Signed-off-by: Vivien Didelot --- include/net/ds

[PATCH] Documentation: gpio: correct platform data section

2015-06-30 Thread Vivien Didelot
board.txt documentation file to machine.txt, to be consistent with the related include/linux/gpio/machine.h file, similar to the regulator files. Signed-off-by: Vivien Didelot --- Documentation/gpio/00-INDEX | 2 +- Documentation/gpio/{board.txt => machine.txt} |

Re: [v2,2/3] watchdog: max63xx: add GPIO support

2015-06-29 Thread Vivien Didelot
Hi Guenter, On Jun 27, 2015, at 12:17 PM, Guenter Roeck li...@roeck-us.net wrote: > On 06/22/2015 01:43 PM, Vivien Didelot wrote: >> Hi Guenter, >> >> On Jun 22, 2015, at 12:53 PM, Guenter Roeck li...@roeck-us.net wrote: >>> On Wed, Jun 17, 2015 at 06:58:59

Re: [PATCH 1/3] net: dsa: mv88e6xxx: add debugfs interface for VTU

2015-06-26 Thread Vivien Didelot
Hi Andrew, On Jun 26, 2015, at 11:23 AM, Andrew Lunn and...@lunn.ch wrote: >> >> +static int _mv88e6xxx_vtu_getnext(struct dsa_switch *ds, u16 vid, >> >> + struct mv88e6xxx_vtu_entry *entry) >> >> +{ >> >> +int ret, i; >> >> + >> >> +ret = _mv88e6xxx_vtu_wait(ds); >> >> +

Re: [PATCH 1/3] net: dsa: mv88e6xxx: add debugfs interface for VTU

2015-06-26 Thread Vivien Didelot
Hi Andrew, On Jun 26, 2015, at 10:04 AM, Andrew Lunn and...@lunn.ch wrote: > On Tue, Jun 23, 2015 at 05:46:08PM -0400, Vivien Didelot wrote: >> Implement the Get Next operation for the VLAN Table Unit, and a "vtu" >> debugfs file to dump the hardware VLANs. >> &

Re: [PATCH 2/3] net: dsa: mv88e6xxx: add support to dump VLANs

2015-06-26 Thread Vivien Didelot
Hi Andrew, On Jun 26, 2015, at 10:10 AM, Andrew Lunn and...@lunn.ch wrote: > On Tue, Jun 23, 2015 at 05:46:09PM -0400, Vivien Didelot wrote: >> This commit implements the port_vlan_dump function in the >> dsa_switch_driver structure for Marvell 88E6xxx compatible switches. >&g

Re: [PATCH 3/3] net: dsa: mv88e6352: add support for port_vlan_dump

2015-06-26 Thread Vivien Didelot
Hi Andrew, On Jun 26, 2015, at 10:12 AM, Andrew Lunn and...@lunn.ch wrote: > On Tue, Jun 23, 2015 at 05:46:10PM -0400, Vivien Didelot wrote: >> Add support for dumping the VLAN Table Unit entries by pointing to the >> port_vlan_dump function implemented for mv88e6xxx. >&

[PATCH v2 2/4] net: dsa: add support for switchdev VLAN objects

2015-06-24 Thread Vivien Didelot
This patch adds the glue between DSA and switchdev operations to add, delete and dump SWITCHDEV_OBJ_PORT_VLAN objects. This is a first step to link the "bridge vlan" command with hardware entries for DSA compatible switch chips. Signed-off-by: Vivien Didelot --- include/net/ds

[PATCH v2 3/4] net: dsa: mv88e6xxx: add support to dump VLANs

2015-06-24 Thread Vivien Didelot
swp41200 br0 None Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6352.c | 1 + drivers/net/dsa/mv88e6xxx.c | 44 drivers/net/dsa/mv88e6xxx.h | 2 ++ 3 files changed, 47 insertions(+) diff --git a/drivers/net/dsa/mv88e6352.c b/drive

[PATCH v2 4/4] net: dsa: mv88e6xxx: add support to add/del VLANs

2015-06-24 Thread Vivien Didelot
A configuration like "VID 10: 1t 2t 4u" can be achieved like this: bridge vlan add dev swp1 vid 10 master bridge vlan add dev swp2 vid 10 master bridge vlan add dev swp4 vid 10 master untagged pvid Removing the port 3 from VLAN 10 is done with: bridge vlan del dev swp2

[PATCH v2 1/4] net: dsa: mv88e6xxx: add debugfs interface for VTU

2015-06-24 Thread Vivien Didelot
x t x x t x 1200 1212 0x x t x t t x Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 141 drivers/net/dsa/mv88e6xxx.h | 24 2 files changed, 165 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx.c b/drive

[PATCH v2 0/4] net: dsa: mv88e6352: add support for VLAN Table Unit

2015-06-24 Thread Vivien Didelot
2 0x x t x t t x Cheers, -v [1] https://lkml.org/lkml/2015/6/1/752 Vivien Didelot (4): net: dsa: mv88e6xxx: add debugfs interface for VTU net: dsa: add support for switchdev VLAN objects net: dsa: mv88e6xxx: add support to dump VLANs net: dsa: mv88e6xxx: add support to add

[PATCH 1/3] net: dsa: mv88e6xxx: add debugfs interface for VTU

2015-06-23 Thread Vivien Didelot
x t x x t x 1200 1212 0x x t x t t x Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 138 drivers/net/dsa/mv88e6xxx.h | 24 2 files changed, 162 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx.c b/drive

[PATCH 2/3] net: dsa: mv88e6xxx: add support to dump VLANs

2015-06-23 Thread Vivien Didelot
swp41200 br0 None Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 44 drivers/net/dsa/mv88e6xxx.h | 2 ++ 2 files changed, 46 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c index 0dce8e

[PATCH 0/3] net: dsa: mv88e6xxx: dump hardware VLANs

2015-06-23 Thread Vivien Didelot
ress Untagged swp41200 swp41200 br0 None [1] https://lkml.org/lkml/2015/6/23/494 Vivien Didelot (3): net: dsa: mv88e6xxx: add debugfs interface for VTU net: dsa: mv88e6xxx: add support to dump VLANs net: dsa: mv88e6352: add support for port_vlan_dump

[PATCH 3/3] net: dsa: mv88e6352: add support for port_vlan_dump

2015-06-23 Thread Vivien Didelot
Add support for dumping the VLAN Table Unit entries by pointing to the port_vlan_dump function implemented for mv88e6xxx. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6352.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/dsa/mv88e6352.c b/drivers/net/dsa/mv88e6352.c

[PATCH] net: dsa: add support for switchdev VLAN objects

2015-06-23 Thread Vivien Didelot
This patch adds the glue between DSA and switchdev operations to add, delete and dump SWITCHDEV_OBJ_PORT_VLAN objects. This is a first step to link the "bridge vlan" command with hardware entries for DSA compatible switch chips. Signed-off-by: Vivien Didelot --- include/net/ds

[PATCH] net: switchdev: ignore unsupported bridge flags

2015-06-23 Thread Vivien Didelot
switchdev_port_bridge_getlink() queries SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS attributes, but a driver doesn't need to implement this in order to get bridge link information. So error out only on errors different than -EOPNOTSUPP. (This is a follow-up patch for 7d4f8d8.) Signed-off-by: V

Re: [v2,3/3] watchdog: max63xx: add heartbeat to platform data

2015-06-22 Thread Vivien Didelot
Hi Guenter, On Jun 22, 2015, at 12:59 PM, Guenter Roeck li...@roeck-us.net wrote: > Hi Vivien, > > On Wed, Jun 17, 2015 at 06:59:00PM -0400, Vivien Didelot wrote: >> Actually, there is no way but the module parameter to set the desired >> heartbeat. This patch allows a platf

Re: [v2,2/3] watchdog: max63xx: add GPIO support

2015-06-22 Thread Vivien Didelot
Hi Guenter, On Jun 22, 2015, at 12:53 PM, Guenter Roeck li...@roeck-us.net wrote: > On Wed, Jun 17, 2015 at 06:58:59PM -0400, Vivien Didelot wrote: >> Introduce a new struct max63xx_platform_data to support MAX63xx watchdog >> chips connected via GPIO. A platform code can fill this

[PATCH] net: dsa: mv88e6xxx: split phy page accessors

2015-06-19 Thread Vivien Didelot
error" labels to "clear", since it is not only an error path. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 43 --- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/d

[PATCH v2 1/3] watchdog: max63xx: dynamically allocate device

2015-06-17 Thread Vivien Didelot
This patch removes the static watchdog device for a new max63xx_wdt data structure, and constifies the max63xx_timeout data. The new structure contains pointers to pin access routines, which abstracts mmap-specific code. This will ease future accesses like GPIO. Signed-off-by: Vivien Didelot

[PATCH v2 2/3] watchdog: max63xx: add GPIO support

2015-06-17 Thread Vivien Didelot
: Vivien Didelot --- drivers/watchdog/Kconfig | 2 +- drivers/watchdog/max63xx_wdt.c| 53 ++- include/linux/platform_data/max63xx_wdt.h | 27 3 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 include/linux

[PATCH v2 3/3] watchdog: max63xx: add heartbeat to platform data

2015-06-17 Thread Vivien Didelot
over the platform setting. If not set, it will still default to DEFAULT_HEARTBEAT. Signed-off-by: Vivien Didelot --- drivers/watchdog/max63xx_wdt.c| 6 +- include/linux/platform_data/max63xx_wdt.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers

Re: [RESEND PATCH 0/3] watchdog: MAX63xx cleanup and platform settings

2015-06-15 Thread Vivien Didelot
Hi Guenter, On Jun 15, 2015, at 5:41 PM, Guenter Roeck li...@roeck-us.net wrote: > On 06/15/2015 12:58 PM, Vivien Didelot wrote: >> The first version of this patchset from January, 29 [1] got no feedback >> from the maintainer. 1/4 [2] was applied to watchdog-next on May, 30 >&

[RESEND PATCH 1/3] watchdog: max63xx: cleanup

2015-06-15 Thread Vivien Didelot
emove them in favor of clear comments in related max63xx_mmap_{ping,set} functions. Signed-off-by: Vivien Didelot --- drivers/watchdog/Kconfig | 7 +- drivers/watchdog/max63xx_wdt.c | 207 - 2 files changed, 108 insertions(+), 106 deletions(-) di

[RESEND PATCH 3/3] watchdog: max63xx: add heartbeat to platform data

2015-06-15 Thread Vivien Didelot
over the platform setting. If not set, it will still default to DEFAULT_HEARTBEAT. Signed-off-by: Vivien Didelot --- drivers/watchdog/max63xx_wdt.c| 8 ++-- include/linux/platform_data/max63xx_wdt.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers

[RESEND PATCH 2/3] watchdog: max63xx: add GPIO support

2015-06-15 Thread Vivien Didelot
This patch adds support for GPIO wired MAX63xx devices. It adds a platform data structure which can be filled by a platform code with the GPIO line numbers. The driver takes care of requesting and releasing them. Signed-off-by: Vivien Didelot --- drivers/watchdog/Kconfig | 2

[RESEND PATCH 0/3] watchdog: MAX63xx cleanup and platform settings

2015-06-15 Thread Vivien Didelot
lt-in driver. [1] https://lkml.org/lkml/2015/1/29/753 [2] https://lkml.org/lkml/2015/1/29/752 Vivien Didelot (3): watchdog: max63xx: cleanup watchdog: max63xx: add GPIO support watchdog: max63xx: add heartbeat to platform data drivers/watchdog/Kconfig | 9 +- drivers/wat

Re: [RFC 6/9] net: dsa: mv88e6352: allow egress of unknown multicast

2015-06-09 Thread Vivien Didelot
Hi Guenter, On Jun 2, 2015, at 9:52 PM, Vivien Didelot vivien.dide...@savoirfairelinux.com wrote: > On Jun 2, 2015, at 10:20 AM, Guenter Roeck li...@roeck-us.net wrote: >> On 06/01/2015 06:27 PM, Vivien Didelot wrote: >>> This patch disables egress of unknown unicast des

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-03 Thread Vivien Didelot
Hi Guenter, On Jun 2, 2015, at 10:17 PM, Guenter Roeck li...@roeck-us.net wrote: > On Tue, Jun 02, 2015 at 09:39:50PM -0400, Vivien Didelot wrote: >> Guenter, >> >> On Jun 2, 2015, at 2:50 AM, Guenter Roeck li...@roeck-us.net wrote: >> > On 06/01/2015

Re: [RFC 6/9] net: dsa: mv88e6352: allow egress of unknown multicast

2015-06-02 Thread Vivien Didelot
Hi Guenter, On Jun 2, 2015, at 10:20 AM, Guenter Roeck li...@roeck-us.net wrote: > On 06/01/2015 06:27 PM, Vivien Didelot wrote: >> This patch disables egress of unknown unicast destination addresses. >> > > Hi Vivien, > > seems to me this patch is unrelated to the r

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-02 Thread Vivien Didelot
Guenter, On Jun 2, 2015, at 2:50 AM, Guenter Roeck li...@roeck-us.net wrote: > On 06/01/2015 06:27 PM, Vivien Didelot wrote: >> +/* Bringing an interface up adds it to the VLAN 0. Ignore this. */ >> +if (!vid) >> +return 0; >> + > > Me puzzle

Re: [RFC 5/9] net: dsa: mv88e6352: disable mirroring

2015-06-02 Thread Vivien Didelot
Hi Guenter, Andrew, On Jun 2, 2015, at 10:53 AM, Andrew Lunn and...@lunn.ch wrote: On Tue, Jun 02, 2015 at 07:16:10AM -0700, Guenter Roeck wrote: >> On 06/01/2015 06:27 PM, Vivien Didelot wrote: >> >Disable the mirroring policy in the monitor control register, since this >> &

Re: [RFC 7/9] net: dsa: mv88e6352: lock CPU port from learning addresses

2015-06-02 Thread Vivien Didelot
Hi Guenter, On Jun 2, 2015, at 10:24 AM, Guenter Roeck li...@roeck-us.net wrote: On 06/01/2015 06:27 PM, Vivien Didelot wrote: >> This commit disables SA learning and refreshing for the CPU port. >> > > Hi Vivien, > > This patch also seems to be unrelated to the rest of

Re: [RFC 2/9] net: dsa: add basic support for VLAN operations

2015-06-02 Thread Vivien Didelot
Hi Guenter, On Jun 2, 2015, at 10:42 AM, Guenter Roeck li...@roeck-us.net wrote: On 06/01/2015 06:27 PM, Vivien Didelot wrote: >> This patch adds the glue between DSA and switchdev to add and delete >> SWITCHDEV_OBJ_PORT_VLAN objects. >> >> This will allow the DSA switch

Re: [RFC 8/9] net: dsa: mv88e6352: set port 802.1Q mode to Secure

2015-06-02 Thread Vivien Didelot
Hi Guenter, On Jun 2, 2015, at 10:31 AM, Guenter Roeck li...@roeck-us.net wrote: On 06/01/2015 06:27 PM, Vivien Didelot wrote: >> This commit changes the 802.1Q mode of each port from Disabled to >> Secure. This enables the VLAN support, by checking the VTU entries on >> ingress

[RFC 7/9] net: dsa: mv88e6352: lock CPU port from learning addresses

2015-06-01 Thread Vivien Didelot
This commit disables SA learning and refreshing for the CPU port. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 8 +--- drivers/net/dsa/mv88e6xxx.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa

[RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-01 Thread Vivien Didelot
This commit implements the port_vlan_add and port_vlan_del functions in the dsa_switch_driver structure for Marvell 88E6xxx compatible switches. This allows to access a switch VLAN Table Unit, and thus define VLANs from standard userspace commands such as "bridge vlan". Signed-off-

[RFC 8/9] net: dsa: mv88e6352: set port 802.1Q mode to Secure

2015-06-01 Thread Vivien Didelot
This commit changes the 802.1Q mode of each port from Disabled to Secure. This enables the VLAN support, by checking the VTU entries on ingress. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 14 +++--- drivers/net/dsa/mv88e6xxx.h | 5 + 2 files changed, 12

[RFC 5/9] net: dsa: mv88e6352: disable mirroring

2015-06-01 Thread Vivien Didelot
Disable the mirroring policy in the monitor control register, since this feature is not needed. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6352.c | 10 +++--- drivers/net/dsa/mv88e6xxx.h | 1 + 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/net/dsa

[RFC 4/9] net: dsa: mv88e6352: add support for VLAN

2015-06-01 Thread Vivien Didelot
This commit adds support for the VTU operations to the mv88e6352 driver. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6352.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/dsa/mv88e6352.c b/drivers/net/dsa/mv88e6352.c index b524bd3..838494a 100644 --- a/drivers/net

[RFC 1/9] net: dsa: add basic support for switchdev obj

2015-06-01 Thread Vivien Didelot
This patch adds the switchdev operations to add and delete switchdev objects. This will be necessary to add fdb or VLAN entries. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/net/dsa/slave.c b/net

[RFC 2/9] net: dsa: add basic support for VLAN operations

2015-06-01 Thread Vivien Didelot
Signed-off-by: Vivien Didelot --- include/net/dsa.h | 7 +++ net/dsa/slave.c | 61 +-- 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/include/net/dsa.h b/include/net/dsa.h index fbca63b..726357b 100644 --- a/include/net/d

[RFC 9/9] net: dsa: fix EDSA frame from hwaccel frame

2015-06-01 Thread Vivien Didelot
this approach is simpler.] Signed-off-by: Vivien Didelot --- net/dsa/tag_edsa.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c index 9aeda59..c1c9548 100644 --- a/net/dsa/tag_edsa.c +++ b/net/dsa/tag_edsa.c @@ -9,6 +9,7 @@ */ #include

[RFC 6/9] net: dsa: mv88e6352: allow egress of unknown multicast

2015-06-01 Thread Vivien Didelot
This patch disables egress of unknown unicast destination addresses. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 3 ++- drivers/net/dsa/mv88e6xxx.h | 5 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa

[RFC 0/9] net: dsa: mv88e6352: add 802.1q VLAN support

2015-06-01 Thread Vivien Didelot
eq 0 4); do ip link set dev swp$i up master br0 # HACK: bridge assumes the following but doesn't call ndo_bridge_setlink bridge vlan add vid 1 pvid untagged dev swp$i master self done Best, -v Vivien Didelot (9): net: dsa: add basic support for switchdev obj net

[PATCH] if_vlan: fix vlaue -> value typo

2015-05-27 Thread Vivien Didelot
Fixes "vlaue" for "value" in include/linux/if_vlan.h. Signed-off-by: Vivien Didelot --- include/linux/if_vlan.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index b9ab677..a40d298 100644 --- a/inc

Re: [PATCH 1/3] net: dsa: introduce module_switch_driver macro

2015-05-02 Thread Vivien Didelot
Hi all, >>> This commit introduces a new module_switch_driver macro, similar to >>> module_platform_driver and such, to reduce boilerplate when declaring >>> DSA switch drivers. >>> >>> In order to use the module_driver macro, register_switch_driver needed >>> to be changed to return an int instea

[RFC] net: dsa: export mv88e6xxx functions

2015-05-02 Thread Vivien Didelot
code, and does not have to be a module. This allows the switch drivers to be complete modules, remove the need to expose the dsa_switch_driver structures, and reduce code. Signed-off-by: Vivien Didelot --- drivers/net/dsa/Kconfig | 8 - drivers/net/dsa/Makefile | 18

Re: [PATCH 1/3] net: dsa: introduce module_switch_driver macro

2015-05-02 Thread Vivien Didelot
Hi Florian, >> This commit introduces a new module_switch_driver macro, similar to >> module_platform_driver and such, to reduce boilerplate when declaring >> DSA switch drivers. >> >> In order to use the module_driver macro, register_switch_driver needed >> to be changed to return an int instead

[PATCH 1/3] net: dsa: introduce module_switch_driver macro

2015-05-01 Thread Vivien Didelot
. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 13 - net/dsa/dsa.c | 4 +++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/include/net/dsa.h b/include/net/dsa.h index fbca63b..927f16a 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -11,6 +11,7

[PATCH 3/3] net: dsa: mv88e6060: use module_switch_driver

2015-05-01 Thread Vivien Didelot
Use the module_switch_driver helper macro to declare the driver and thus reduce boilerplate. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6060.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/dsa/mv88e6060.c b/drivers/net/dsa/mv88e6060.c

[PATCH 2/3] net: dsa: sf2: use module_switch_driver

2015-05-01 Thread Vivien Didelot
Use the module_switch_driver helper macro to declare the driver and thus reduce boilerplate. Signed-off-by: Vivien Didelot --- drivers/net/dsa/bcm_sf2.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index

[PATCH] net: dsa: mv88e6xxx: unregister mv88e6352 driver

2015-05-01 Thread Vivien Didelot
Add the missing unregister for the mv88e6352_switch_driver. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c index 51130fc..7339885 100644 --- a/drivers/net/dsa

[PATCH] net: mdio-gpio: support access that may sleep

2015-04-22 Thread Vivien Didelot
Some systems using mdio-gpio may use gpio on message based busses, which require sleeping (e.g. gpio from an I2C I/O expander). Since this driver does not use IRQ handler, it is safe to use the _cansleep suffixed gpio accessors. Signed-off-by: Vivien Didelot --- drivers/net/phy/mdio-gpio.c

[PATCH] net: dsa: mv88e6xxx: use PORT_DEFAULT_VLAN

2015-04-20 Thread Vivien Didelot
Minor, use the explicit PORT_DEFAULT_VLAN define instead of 0x07. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c index 48712bd..af639ab 100644 --- a

[PATCH] net: dsa: mv88e6xxx: fix setup of port control 1

2015-04-20 Thread Vivien Didelot
mv88e6xxx_setup_port_common was writing to PORT_DEFAULT_VLAN (port offset 0x07) instead of PORT_CONTROL_1 (port offset 0x05). Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers

[PATCH v2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-17 Thread Vivien Didelot
ff-by: Vivien Didelot --- net/dsa/dsa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 5eaadab..079a224 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -124,7 +124,7 @@ static ssize_t temp1_max_store(struct device *dev, r

Re: [PATCH 2/2] net: dsa: register hwmon for any provided function

2015-04-17 Thread Vivien Didelot
Hi Guenter, > >>> switch (index) { > >>> +case 0: /* temp1_input */ > >>> +if (drv->get_temp) > >>> +mode |= S_IRUGO; > >> > >> This should be mandatory. Sorry, I don't really understand what you > >> are trying to accomplish here. > >> > >

Re: [PATCH 2/2] net: dsa: register hwmon for any provided function

2015-04-16 Thread Vivien Didelot
Hi Guenter, > > switch (index) { > > +case 0: /* temp1_input */ > > +if (drv->get_temp) > > +mode |= S_IRUGO; > > This should be mandatory. Sorry, I don't really understand what you are > trying to accomplish here. > > Can you give me a re

Re: [PATCH 1/2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-16 Thread Vivien Didelot
Hello Sergei, > > Since commit da4759c, sysfs will only use the permissions returned by > > Please also specify that commit's summary line in parens. Duly noted. da4759c is "sysfs: Use only return value from is_visible for the file mode" (see: https://git.kernel.org/cgit/linux/kernel/git/t

[PATCH 1/2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-16 Thread Vivien Didelot
sible. Also, allow temp1_max to be write-only if set_temp_limit is provided, but not get_temp_limit. Signed-off-by: Vivien Didelot --- net/dsa/dsa.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 5eaadab..67d2983 1

[PATCH 2/2] net: dsa: register hwmon for any provided function

2015-04-16 Thread Vivien Didelot
A switch driver may only provide one of the temperature limit accessors, or the temperature alarm getter. So register the hwmon subsystem if any of the related functions is provided. Thus, check get_temp to set the visibility of temp1_input. Signed-off-by: Vivien Didelot --- net/dsa/dsa.c | 7

Re: [PATCH 0/4] watchdog: MAX63xx cleanup and platform settings

2015-04-16 Thread Vivien Didelot
g. > > Tested with a GPIO wired MAX6373 on an Atom platform, with a built-in driver. > > Vivien Didelot (4): > watchdog: MAX63XX_WATCHDOG does not depend on ARM > watchdog: max63xx: cleanup > watchdog: max63xx: add GPIO support > watchdog: max63xx: add heartbeat to pl

[PATCH] ARM: gemini: remove unnecessary mdio-gpio includes

2015-04-16 Thread Vivien Didelot
Remove the inclusion of linux/mdio-gpio.h in nas4220b, wbd111 and wbd222 boards since mdio-gpio is not used. Signed-off-by: Vivien Didelot --- arch/arm/mach-gemini/board-nas4220b.c | 1 - arch/arm/mach-gemini/board-wbd111.c | 1 - arch/arm/mach-gemini/board-wbd222.c | 1 - 3 files changed

[PATCH v3 2/3] sysfs: Only accept read/write permissions for file attributes

2015-03-12 Thread Vivien Didelot
permissions in octal format and limiting the scope of attributes to SYSFS_PREALLOC | 0664. [1] https://lkml.org/lkml/2015/1/19/599 Cc: Guenter Roeck Signed-off-by: Vivien Didelot --- fs/sysfs/group.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c

[PATCH v3 1/3] sysfs: Use only return value from is_visible for the file mode

2015-03-12 Thread Vivien Didelot
only use the permissions returned from it instead of oring the returned value with the hard-coded permissions. Signed-off-by: Guenter Roeck Signed-off-by: Vivien Didelot --- fs/sysfs/group.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/sysfs/group.c b/fs/sysfs

[PATCH v3 0/3] sysfs: Refine is_visible API

2015-03-12 Thread Vivien Didelot
. Guenter Roeck (2): sysfs: Use only return value from is_visible for the file mode sysfs: Document struct attribute_group Vivien Didelot (1): sysfs: Only accept read/write permissions for file attributes fs/sysfs/group.c | 11 --- include/linux/sysfs.h | 15 +++ 2 files

[PATCH v3 3/3] sysfs: Document struct attribute_group

2015-03-12 Thread Vivien Didelot
From: Guenter Roeck Document variables defined in struct attribute_group to ensure correct usage. Signed-off-by: Guenter Roeck Signed-off-by: Vivien Didelot --- include/linux/sysfs.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/linux/sysfs.h b/include/linux

Re: [PATCH v2 2/3] sysfs: Only accept read/write permissions for file attributes

2015-03-12 Thread Vivien Didelot
Hi Greg, Guenter, > On 03/12/2015 03:01 AM, Greg Kroah-Hartman wrote: > > On Wed, Mar 11, 2015 at 02:22:10PM -0400, Vivien Didelot wrote: > >> For sysfs file attributes, only read and write permissions make sense. > >> Mask provided attribute permissions accordingly and

[PATCH v2 1/3] sysfs: Use only return value from is_visible for the file mode

2015-03-11 Thread Vivien Didelot
only use the permissions returned from it instead of oring the returned value with the hard-coded permissions. Cc: Vivien Didelot Signed-off-by: Guenter Roeck --- fs/sysfs/group.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index

[PATCH v2 2/3] sysfs: Only accept read/write permissions for file attributes

2015-03-11 Thread Vivien Didelot
permissions in octal format and limiting the scope of attributes to SYSFS_PREALLOC | 0664. [1] https://lkml.org/lkml/2015/1/19/599 Cc: Guenter Roeck Signed-off-by: Vivien Didelot --- fs/sysfs/group.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c

[PATCH v2 3/3] sysfs: Document struct attribute_group

2015-03-11 Thread Vivien Didelot
From: Guenter Roeck Document variables defined in struct attribute_group to ensure correct usage. Signed-off-by: Guenter Roeck --- include/linux/sysfs.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index ddad161..99382c0 100

[PATCH v2 0/3] sysfs: Refine is_visible API

2015-03-11 Thread Vivien Didelot
return value from is_visible for the file mode sysfs: Document struct attribute_group Vivien Didelot (1): sysfs: Only accept read/write permissions for file attributes fs/sysfs/group.c | 11 --- include/linux/sysfs.h | 15 +++ 2 files changed, 23 insertions(+), 3

Re: [PATCH 2/4] watchdog: max63xx: cleanup

2015-01-30 Thread Vivien Didelot
Hi Guenter, > > -#define MAX6369_WDSET (7 << 0) > > -#define MAX6369_WDI(1 << 3) > > Not really sure I understand why you remove those constants. > that is personal preference, not cleanup. Someone else might > submit another cleanup later on and re-introduce them. Indeed, I should

[PATCH 4/4] watchdog: max63xx: add heartbeat to platform data

2015-01-29 Thread Vivien Didelot
over the platform setting. If not set, it will still default to DEFAULT_HEARTBEAT. Signed-off-by: Vivien Didelot --- drivers/watchdog/max63xx_wdt.c| 8 ++-- include/linux/platform_data/max63xx_wdt.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 2/4] watchdog: max63xx: cleanup

2015-01-29 Thread Vivien Didelot
ckpatch.pl; * constify timeouts; * factorize the SET write operations; * few typos and comments... This will help introduce new features to the driver. Signed-off-by: Vivien Didelot --- drivers/watchdog/Kconfig | 7 +- drivers/watchdog/max63xx_w

[PATCH 3/4] watchdog: max63xx: add GPIO support

2015-01-29 Thread Vivien Didelot
This patch adds support for GPIO wired MAX63xx devices. It adds a platform data structure which can be filled by a platform code with the GPIO line numbers. The driver takes care of requesting and release them. Signed-off-by: Vivien Didelot --- drivers/watchdog/Kconfig | 2

[PATCH 0/4] watchdog: MAX63xx cleanup and platform settings

2015-01-29 Thread Vivien Didelot
ith a built-in driver. Vivien Didelot (4): watchdog: MAX63XX_WATCHDOG does not depend on ARM watchdog: max63xx: cleanup watchdog: max63xx: add GPIO support watchdog: max63xx: add heartbeat to platform data drivers/watchdog/Kconfig | 9 +- drivers/watchdog/max63xx_

[PATCH 1/4] watchdog: MAX63XX_WATCHDOG does not depend on ARM

2015-01-29 Thread Vivien Didelot
Remove the ARM Kconfig dependency since the Maxim MAX63xx devices are architecture independent. Signed-off-by: Vivien Didelot --- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 08f41ad

[PATCH] net: dsa/mv88e6352: make mv88e6352_wait generic

2015-01-23 Thread Vivien Didelot
the redundant check for ret < 0. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6352.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/dsa/mv88e6352.c b/drivers/net/dsa/mv88e6352.c index 258d9ef..e13adc7 100644 --- a/drivers/net/dsa/mv88e6

[PATCH] net: dsa/mv88e6xxx: add reg read and write debug

2015-01-23 Thread Vivien Didelot
0x08 val: 0x0330 mdio-gpio mdio-gpio.0: -> addr: 0x1b reg: 0x09 val: 0x This is convenient to dynamically debug operations through debugfs with: echo file mv88e6xxx.c +p > /dynamic_debug/control Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 9 + 1

[PATCH v3 1/2] asus-laptop: use DEVICE_ATTR_xx macros

2015-01-23 Thread Vivien Didelot
y. Signed-off-by: Vivien Didelot --- drivers/platform/x86/asus-laptop.c | 95 ++ 1 file changed, 46 insertions(+), 49 deletions(-) diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 00f5e82..46b2746 100644 --- a/driver

[PATCH v3 2/2] asus-laptop: cleanup is_visible

2015-01-23 Thread Vivien Didelot
Get rid of the "normal" label, use one if-statement per attribute for maintainability and change s/supported/ret/ and s/asus->handle/handle/ to fix a coding style issue (lines with 80+ chars). Signed-off-by: Vivien Didelot --- drivers/platform/x86/asus-

Re: [PATCH v2 2/3] asus-laptop: use DEVICE_ATTR_* macros

2015-01-21 Thread Vivien Didelot
Hi Darren, > > Use DEVICE_ATTR_{RO,WO,RW} macros to simplify attributes > > declarations. > > It does a lot more than that, including a lot of seemingly > superfluous reformatting of function declarations and renaming. What do you mean? DEVICE_ATTR_RW(foo) requires foo_show() and foo_store() func

Re: [PATCH] net: dsa: set parent of hwmon device

2015-01-21 Thread Vivien Didelot
Hi Guenter, Florian, >>> - ds->hwmon_dev = hwmon_device_register_with_groups(NULL, >>> + ds->hwmon_dev = hwmon_device_register_with_groups(parent, >>> ds->hwmon_name, ds, >>> dsa_hwmon_groups); >>> if (IS_ERR(ds->

[PATCH] net: dsa: set slave MII bus PHY mask

2015-01-20 Thread Vivien Didelot
ts 0-4 will be scanned and the instance will be successfully created. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 515569f..589aafd 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -46,

[PATCH] net: dsa: set parent of hwmon device

2015-01-20 Thread Vivien Didelot
Set the dsa device as the parent of the hwmon device, in order to link the hwmon subsystem under the corresponding /sys/devices/platform/dsa.X/ sysfs directory. Signed-off-by: Vivien Didelot --- net/dsa/dsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/dsa.c b

Re: [PATCH v2 3/3] asus-laptop: cleanup is_visible

2015-01-20 Thread Vivien Didelot
Hi Corentin, > > Use the attribute indexes and concise the if statements. > > > Why ? I really don't see that as an improvement. The improvement is code clarity and maintainability. I'm not use we want to keep multiple returns and this goto thing. I think per-attribute if-statements are clearer.

Re: [PATCH 2/3] sysfs: Only accept read/write permissions for file attributes

2015-01-20 Thread Vivien Didelot
Hi Guenter, >>> @@ -55,6 +55,12 @@ static int create_files(struct kernfs_node *parent, >>> struct kobject *kobj, >>> if (!mode) >>> continue; >>> } >>> + >>> +WARN(mode &

Re: [PATCH 2/3] sysfs: Only accept read/write permissions for file attributes

2015-01-19 Thread Vivien Didelot
Hi Guenter, > For sysfs file attributes, only read and write permisssions make sense. Minor typo, there's an extra 's' to permissions. > Mask provided attribute permissions accordingly and send a warning > to the console if invalid permission bits are set. > > Cc

[PATCH 1/2] HID: hid-lg4ff: fix sysfs attribute permission

2015-01-18 Thread Vivien Didelot
There is no reason to set the range attribute executable to the user and group, and writable to the group. Fix the permission to 0644. Signed-off-by: Vivien Didelot --- drivers/hid/hid-lg4ff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-lg4ff.c b

[PATCH 2/2] HID: hid-lg4ff: use DEVICE_ATTR_RW macro

2015-01-18 Thread Vivien Didelot
Use the DEVICE_ATTR_RW macro to reduce boiler plate and move the attribute declaration to get rid of function signatures. Signed-off-by: Vivien Didelot --- drivers/hid/hid-lg4ff.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/hid/hid-lg4ff.c b/drivers

[PATCH v2 2/3] asus-laptop: use DEVICE_ATTR_* macros

2015-01-18 Thread Vivien Didelot
Use DEVICE_ATTR_{RO,WO,RW} macros to simplify attributes declarations. Signed-off-by: Vivien Didelot --- drivers/platform/x86/asus-laptop.c | 95 ++ 1 file changed, 46 insertions(+), 49 deletions(-) diff --git a/drivers/platform/x86/asus-laptop.c b/drivers

[PATCH v2 3/3] asus-laptop: cleanup is_visible

2015-01-18 Thread Vivien Didelot
Use the attribute indexes and concise the if statements. Signed-off-by: Vivien Didelot --- drivers/platform/x86/asus-laptop.c | 98 -- 1 file changed, 40 insertions(+), 58 deletions(-) diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86

[PATCH v2 1/3] asus-laptop: fix is_visible return value

2015-01-18 Thread Vivien Didelot
With a Lucid platform, asus_sysfs_is_visible() returned a boolean for ls_switch and ls_level attributes. Signed-off-by: Vivien Didelot --- drivers/platform/x86/asus-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/asus-laptop.c b/drivers

<    11   12   13   14   15   16   17   >