diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-28 14:06:43 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-28 14:06:43 -0800 |
commit | fe2b0cdabcd9e6aeca66a104bc03576946e5fee2 (patch) | |
tree | 3abffb169919155a4039188f7262c9fd9c64457d /arch/mips | |
parent | 956eb6cb36765e3a79a744e6c9364dab1548e460 (diff) | |
parent | 9f83cfdb1ace3ef268ecc6fda50058d2ec37d603 (diff) |
Merge tag 'for-4.21/libata-20181221' of git://git.kernel.dk/linux-block
Pull libata updates from Jens Axboe:
"Here are the libata changes for this merge window. Nothing major in
here. This contains:
- GPIO descriptor conversions (Linus Walleij)
- rcar deferred probing fix (Sergei Shtylyov)"
* tag 'for-4.21/libata-20181221' of git://git.kernel.dk/linux-block:
sata_rcar: fix deferred probing
ata: palmld: Introduce state container
ata: palmld: Convert to GPIO descriptors
ata: rb532_cf: Convert to use GPIO descriptors
ata: sata_highbank: Convert to use GPIO descriptors
ata: pxa: Drop <linux/gpio.h> include
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/mach-rc32434/rb.h | 6 | ||||
-rw-r--r-- | arch/mips/rb532/devices.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/arch/mips/include/asm/mach-rc32434/rb.h b/arch/mips/include/asm/mach-rc32434/rb.h index aac8ce8902e7..5dfd4d66d6fc 100644 --- a/arch/mips/include/asm/mach-rc32434/rb.h +++ b/arch/mips/include/asm/mach-rc32434/rb.h @@ -71,12 +71,6 @@ struct korina_device { struct net_device *dev; }; -struct cf_device { - int gpio_pin; - void *dev; - struct gendisk *gd; -}; - struct mpmc_device { unsigned char state; spinlock_t lock; diff --git a/arch/mips/rb532/devices.c b/arch/mips/rb532/devices.c index 2b23ad640f39..828d8cc3a5df 100644 --- a/arch/mips/rb532/devices.c +++ b/arch/mips/rb532/devices.c @@ -23,6 +23,7 @@ #include <linux/mtd/platnand.h> #include <linux/mtd/mtd.h> #include <linux/gpio.h> +#include <linux/gpio/machine.h> #include <linux/gpio_keys.h> #include <linux/input.h> #include <linux/serial_8250.h> @@ -127,14 +128,18 @@ static struct resource cf_slot0_res[] = { } }; -static struct cf_device cf_slot0_data = { - .gpio_pin = CF_GPIO_NUM +static struct gpiod_lookup_table cf_slot0_gpio_table = { + .dev_id = "pata-rb532-cf", + .table = { + GPIO_LOOKUP("gpio0", CF_GPIO_NUM, + NULL, GPIO_ACTIVE_HIGH), + { }, + }, }; static struct platform_device cf_slot0 = { .id = -1, .name = "pata-rb532-cf", - .dev.platform_data = &cf_slot0_data, .resource = cf_slot0_res, .num_resources = ARRAY_SIZE(cf_slot0_res), }; @@ -305,6 +310,7 @@ static int __init plat_setup_devices(void) dev_set_drvdata(&korina_dev0.dev, &korina_dev0_data); + gpiod_add_lookup_table(&cf_slot0_gpio_table); return platform_add_devices(rb532_devs, ARRAY_SIZE(rb532_devs)); } |