Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
350fe5ee
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
350fe5ee
编写于
5月 23, 2017
作者:
L
Linus Walleij
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'mcp23s08' of /home/linus/linux-pinctrl into devel
上级
39d2675a
7f38c5b9
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
425 addition
and
308 deletion
+425
-308
arch/arm/configs/lpc32xx_defconfig
arch/arm/configs/lpc32xx_defconfig
+1
-1
arch/blackfin/configs/BF609-EZKIT_defconfig
arch/blackfin/configs/BF609-EZKIT_defconfig
+1
-1
arch/blackfin/mach-bf527/boards/tll6527m.c
arch/blackfin/mach-bf527/boards/tll6527m.c
+4
-4
arch/blackfin/mach-bf609/boards/ezkit.c
arch/blackfin/mach-bf609/boards/ezkit.c
+2
-2
drivers/gpio/Kconfig
drivers/gpio/Kconfig
+0
-17
drivers/gpio/Makefile
drivers/gpio/Makefile
+0
-1
drivers/pinctrl/Kconfig
drivers/pinctrl/Kconfig
+13
-0
drivers/pinctrl/Makefile
drivers/pinctrl/Makefile
+1
-0
drivers/pinctrl/pinctrl-mcp23s08.c
drivers/pinctrl/pinctrl-mcp23s08.c
+397
-250
include/linux/spi/mcp23s08.h
include/linux/spi/mcp23s08.h
+6
-32
未找到文件。
arch/arm/configs/lpc32xx_defconfig
浏览文件 @
350fe5ee
...
...
@@ -112,7 +112,7 @@ CONFIG_GPIO_SX150X=y
CONFIG_GPIO_74X164=y
CONFIG_GPIO_MAX7301=y
CONFIG_GPIO_MC33880=y
CONFIG_
GPIO
_MCP23S08=y
CONFIG_
PINCTRL
_MCP23S08=y
CONFIG_SENSORS_DS620=y
CONFIG_SENSORS_MAX6639=y
CONFIG_WATCHDOG=y
...
...
arch/blackfin/configs/BF609-EZKIT_defconfig
浏览文件 @
350fe5ee
...
...
@@ -105,7 +105,7 @@ CONFIG_SPI=y
CONFIG_SPI_ADI_V3=y
CONFIG_GPIOLIB=y
CONFIG_GPIO_SYSFS=y
CONFIG_
GPIO
_MCP23S08=y
CONFIG_
PINCTRL
_MCP23S08=y
# CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_BFIN_WDT=y
...
...
arch/blackfin/mach-bf527/boards/tll6527m.c
浏览文件 @
350fe5ee
...
...
@@ -348,14 +348,14 @@ static struct platform_device bfin_i2s = {
};
#endif
#if IS_ENABLED(CONFIG_
GPIO
_MCP23S08)
#if IS_ENABLED(CONFIG_
PINCTRL
_MCP23S08)
#include <linux/spi/mcp23s08.h>
static
const
struct
mcp23s08_platform_data
bfin_mcp23s08_sys_gpio_info
=
{
.
chip
[
0
].
is_present
=
true
,
.
spi_present_mask
=
BIT
(
0
)
,
.
base
=
0x30
,
};
static
const
struct
mcp23s08_platform_data
bfin_mcp23s08_usr_gpio_info
=
{
.
chip
[
2
].
is_present
=
true
,
.
spi_present_mask
=
BIT
(
2
)
,
.
base
=
0x38
,
};
#endif
...
...
@@ -423,7 +423,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.
mode
=
SPI_CPHA
|
SPI_CPOL
,
},
#endif
#if IS_ENABLED(CONFIG_
GPIO
_MCP23S08)
#if IS_ENABLED(CONFIG_
PINCTRL
_MCP23S08)
{
.
modalias
=
"mcp23s08"
,
.
platform_data
=
&
bfin_mcp23s08_sys_gpio_info
,
...
...
arch/blackfin/mach-bf609/boards/ezkit.c
浏览文件 @
350fe5ee
...
...
@@ -1887,7 +1887,7 @@ static struct platform_device i2c_bfin_twi1_device = {
};
#endif
#if IS_ENABLED(CONFIG_
GPIO
_MCP23S08)
#if IS_ENABLED(CONFIG_
PINCTRL
_MCP23S08)
#include <linux/spi/mcp23s08.h>
static
const
struct
mcp23s08_platform_data
bfin_mcp23s08_soft_switch0
=
{
.
base
=
120
,
...
...
@@ -1929,7 +1929,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
I2C_BOARD_INFO
(
"ssm2602"
,
0x1b
),
},
#endif
#if IS_ENABLED(CONFIG_
GPIO
_MCP23S08)
#if IS_ENABLED(CONFIG_
PINCTRL
_MCP23S08)
{
I2C_BOARD_INFO
(
"mcp23017"
,
0x21
),
.
platform_data
=
(
void
*
)
&
bfin_mcp23s08_soft_switch0
...
...
drivers/gpio/Kconfig
浏览文件 @
350fe5ee
...
...
@@ -1232,23 +1232,6 @@ config GPIO_XRA1403
endmenu
menu "SPI or I2C GPIO expanders"
depends on (SPI_MASTER && !I2C) || I2C
config GPIO_MCP23S08
tristate "Microchip MCP23xxx I/O expander"
depends on OF_GPIO
select GPIOLIB_IRQCHIP
select REGMAP_I2C if I2C
select REGMAP if SPI_MASTER
help
SPI/I2C driver for Microchip MCP23S08/MCP23S17/MCP23008/MCP23017
I/O expanders.
This provides a GPIO interface supporting inputs and outputs.
The I2C versions of the chips can be used as interrupt-controller.
endmenu
menu "USB GPIO expanders"
depends on USB
...
...
drivers/gpio/Makefile
浏览文件 @
350fe5ee
...
...
@@ -77,7 +77,6 @@ obj-$(CONFIG_GPIO_MENZ127) += gpio-menz127.o
obj-$(CONFIG_GPIO_MERRIFIELD)
+=
gpio-merrifield.o
obj-$(CONFIG_GPIO_MC33880)
+=
gpio-mc33880.o
obj-$(CONFIG_GPIO_MC9S08DZ60)
+=
gpio-mc9s08dz60.o
obj-$(CONFIG_GPIO_MCP23S08)
+=
gpio-mcp23s08.o
obj-$(CONFIG_GPIO_ML_IOH)
+=
gpio-ml-ioh.o
obj-$(CONFIG_GPIO_MM_LANTIQ)
+=
gpio-mm-lantiq.o
obj-$(CONFIG_GPIO_MOCKUP)
+=
gpio-mockup.o
...
...
drivers/pinctrl/Kconfig
浏览文件 @
350fe5ee
...
...
@@ -146,6 +146,19 @@ config PINCTRL_FALCON
depends on SOC_FALCON
depends on PINCTRL_LANTIQ
config PINCTRL_MCP23S08
tristate "Microchip MCP23xxx I/O expander"
depends on SPI_MASTER || I2C
select GPIOLIB_IRQCHIP
select REGMAP_I2C if I2C
select REGMAP_SPI if SPI_MASTER
select GENERIC_PINCONF
help
SPI/I2C driver for Microchip MCP23S08/MCP23S17/MCP23008/MCP23017
I/O expanders.
This provides a GPIO interface supporting inputs and outputs.
The I2C versions of the chips can be used as interrupt-controller.
config PINCTRL_MESON
bool
depends on OF
...
...
drivers/pinctrl/Makefile
浏览文件 @
350fe5ee
...
...
@@ -19,6 +19,7 @@ obj-$(CONFIG_PINCTRL_DA850_PUPD) += pinctrl-da850-pupd.o
obj-$(CONFIG_PINCTRL_DIGICOLOR)
+=
pinctrl-digicolor.o
obj-$(CONFIG_PINCTRL_FALCON)
+=
pinctrl-falcon.o
obj-$(CONFIG_PINCTRL_MAX77620)
+=
pinctrl-max77620.o
obj-$(CONFIG_PINCTRL_MCP23S08)
+=
pinctrl-mcp23s08.o
obj-$(CONFIG_PINCTRL_MESON)
+=
meson/
obj-$(CONFIG_PINCTRL_OXNAS)
+=
pinctrl-oxnas.o
obj-$(CONFIG_PINCTRL_PALMAS)
+=
pinctrl-palmas.o
...
...
drivers/
gpio/gpio
-mcp23s08.c
→
drivers/
pinctrl/pinctrl
-mcp23s08.c
浏览文件 @
350fe5ee
此差异已折叠。
点击以展开。
include/linux/spi/mcp23s08.h
浏览文件 @
350fe5ee
/* FIXME driver should be able to handle IRQs... */
struct
mcp23s08_chip_info
{
bool
is_present
;
/* true if populated */
unsigned
pullups
;
/* BIT(x) means enable pullup x */
};
struct
mcp23s08_platform_data
{
/* For mcp23s08, up to 4 slaves (numbered 0..3) can share one SPI
* chipselect, each providing 1 gpio_chip instance with 8 gpios.
...
...
@@ -13,31 +5,13 @@ struct mcp23s08_platform_data {
* chipselect, each providing 1 gpio_chip (port A + port B) with
* 16 gpios.
*/
struct
mcp23s08_chip_info
chip
[
8
]
;
u32
spi_present_mask
;
/* "base" is the number of the first GPIO
. Dynamic assignment is
*
not currently supported, and even if there are gaps in chip
*
addressing the GPIO numbers are sequential .. so for example
*
if only slaves 0 and 3 are present, their GPIOs range from
*
base to base+15
(or base+31 for s17 variant).
/* "base" is the number of the first GPIO
or -1 for dynamic
*
assignment. If there are gaps in chip addressing the GPIO
*
numbers are sequential .. so for example if only slaves 0
*
and 3 are present, their GPIOs range from base to base+15
* (or base+31 for s17 variant).
*/
unsigned
base
;
/* Marks the device as a interrupt controller.
* NOTE: The interrupt functionality is only supported for i2c
* versions of the chips. The spi chips can also do the interrupts,
* but this is not supported by the linux driver yet.
*/
bool
irq_controller
;
/* Sets the mirror flag in the IOCON register. Devices
* with two interrupt outputs (these are the devices ending with 17 and
* those that have 16 IOs) have two IO banks: IO 0-7 form bank 1 and
* IO 8-15 are bank 2. These chips have two different interrupt outputs:
* One for bank 1 and another for bank 2. If irq-mirror is set, both
* interrupts are generated regardless of the bank that an input change
* occurred on. If it is not set, the interrupt are only generated for
* the bank they belong to.
* On devices with only one interrupt output this property is useless.
*/
bool
mirror
;
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录