net: dsa: mv88e6xxx: add support for GPIO configuration
authorBrandon Streiff <brandon.streiff@ni.com>
Wed, 14 Feb 2018 00:07:46 +0000 (01:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Feb 2018 19:33:36 +0000 (14:33 -0500)
commita73ccd610690505df3a5b282c32f2f4c4e729d49
tree2fdd7308ada443ba9f8e4fd4a52235293ad30eae
parent2fa8d3af4badc40a39092140a01101119988faf6
net: dsa: mv88e6xxx: add support for GPIO configuration

MV88E6352 and later switches support GPIO control through the "Scratch
& Misc" global2 register. (Older switches do too, though with a slightly
different register interface. Only the 6352-style is implemented here.)

Add a new file, global2_scratch.c, for operations in the Scratch & Misc
space. Additionally, add a GPIO operations structure to present an
abstract view over GPIO manipulation.

Reverse Christmas tree and unsigned has been replaced with unsigned
int by Andrew Lunn.

Signed-off-by: Brandon Streiff <brandon.streiff@ni.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/Makefile
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/global2.c
drivers/net/dsa/mv88e6xxx/global2.h
drivers/net/dsa/mv88e6xxx/global2_scratch.c [new file with mode: 0644]