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
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
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
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
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} |
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
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);
>> >> +
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.
>>
&
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
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.
>&
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
: 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
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
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
>&
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
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
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
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
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
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
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
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
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
>> &
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
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
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
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
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-
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
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
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
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
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
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
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
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
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
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
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
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
.
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
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
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
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
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
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
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
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
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.
> >>
> >
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
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
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
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
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
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
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
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
.
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
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
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
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
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
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
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
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
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
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
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
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_
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
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
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
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
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-
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
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->
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,
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
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.
Hi Guenter,
>>> @@ -55,6 +55,12 @@ static int create_files(struct kernfs_node *parent,
>>> struct kobject *kobj,
>>> if (!mode)
>>> continue;
>>> }
>>> +
>>> +WARN(mode &
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
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
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
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
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
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
1501 - 1600 of 1687 matches
Mail list logo