Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.16-rc4 54 lines 1.5 kB view raw
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Allwinner A523 SoC pinctrl driver. 4 * 5 * Copyright (C) 2023 Arm Ltd. 6 */ 7 8#include <linux/module.h> 9#include <linux/platform_device.h> 10#include <linux/of.h> 11#include <linux/of_device.h> 12#include <linux/pinctrl/pinctrl.h> 13 14#include "pinctrl-sunxi.h" 15 16static const u8 a523_nr_bank_pins[SUNXI_PINCTRL_MAX_BANKS] = 17/* PA PB PC PD PE PF PG PH PI PJ PK */ 18 { 0, 15, 17, 24, 16, 7, 15, 20, 17, 28, 24 }; 19 20static const unsigned int a523_irq_bank_map[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; 21 22static const u8 a523_irq_bank_muxes[SUNXI_PINCTRL_MAX_BANKS] = 23/* PA PB PC PD PE PF PG PH PI PJ PK */ 24 { 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14}; 25 26static struct sunxi_pinctrl_desc a523_pinctrl_data = { 27 .irq_banks = ARRAY_SIZE(a523_irq_bank_map), 28 .irq_bank_map = a523_irq_bank_map, 29 .irq_read_needs_mux = true, 30 .io_bias_cfg_variant = BIAS_VOLTAGE_PIO_POW_MODE_SEL, 31}; 32 33static int a523_pinctrl_probe(struct platform_device *pdev) 34{ 35 return sunxi_pinctrl_dt_table_init(pdev, a523_nr_bank_pins, 36 a523_irq_bank_muxes, 37 &a523_pinctrl_data, 38 SUNXI_PINCTRL_NEW_REG_LAYOUT | 39 SUNXI_PINCTRL_ELEVEN_BANKS); 40} 41 42static const struct of_device_id a523_pinctrl_match[] = { 43 { .compatible = "allwinner,sun55i-a523-pinctrl", }, 44 {} 45}; 46 47static struct platform_driver a523_pinctrl_driver = { 48 .probe = a523_pinctrl_probe, 49 .driver = { 50 .name = "sun55i-a523-pinctrl", 51 .of_match_table = a523_pinctrl_match, 52 }, 53}; 54builtin_platform_driver(a523_pinctrl_driver);