Lines Matching +full:gpio +full:- +full:keys
1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/drivers/mfd/ucb1x00-assabet.c
5 * Copyright (C) 2001-2003 Russell King, All Rights Reserved.
7 * We handle the machine-specific bits of the UCB1x00 driver here.
39 struct ucb1x00 *ucb = dev->ucb; in ucb1x00_assabet_add()
41 struct gpio_keys_platform_data keys; in ucb1x00_assabet_add() local
46 memset(&keys, 0, sizeof(keys)); in ucb1x00_assabet_add()
50 buttons[i].gpio = ucb->gpio.base + i; in ucb1x00_assabet_add()
55 keys.buttons = buttons; in ucb1x00_assabet_add()
56 keys.nbuttons = ARRAY_SIZE(buttons); in ucb1x00_assabet_add()
57 keys.poll_interval = 50; in ucb1x00_assabet_add()
58 keys.name = "ucb1x00"; in ucb1x00_assabet_add()
60 pdev = platform_device_register_data(&ucb->dev, "gpio-keys", -1, in ucb1x00_assabet_add()
61 &keys, sizeof(keys)); in ucb1x00_assabet_add()
63 device_create_file(&ucb->dev, &dev_attr_vbatt); in ucb1x00_assabet_add()
64 device_create_file(&ucb->dev, &dev_attr_vcharger); in ucb1x00_assabet_add()
65 device_create_file(&ucb->dev, &dev_attr_batt_temp); in ucb1x00_assabet_add()
67 dev->priv = pdev; in ucb1x00_assabet_add()
73 struct platform_device *pdev = dev->priv; in ucb1x00_assabet_remove()
78 device_remove_file(&dev->ucb->dev, &dev_attr_batt_temp); in ucb1x00_assabet_remove()
79 device_remove_file(&dev->ucb->dev, &dev_attr_vcharger); in ucb1x00_assabet_remove()
80 device_remove_file(&dev->ucb->dev, &dev_attr_vbatt); in ucb1x00_assabet_remove()