+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/* #define DEBUG */
"SDA",
"TX",
"RX",
+ "W1"
+};
+
+static const char * const sandbox_pins_muxing[] = {
+ "I2C SCL",
+ "I2C SDA",
+ "Uart TX",
+ "Uart RX",
+ "1-wire gpio",
};
static const char * const sandbox_groups[] = {
"serial_a",
"serial_b",
"spi",
+ "w1",
};
static const char * const sandbox_functions[] = {
"i2c",
"serial",
"spi",
+ "w1",
};
static const struct pinconf_param sandbox_conf_params[] = {
return sandbox_pins[selector];
}
+static int sandbox_get_pin_muxing(struct udevice *dev,
+ unsigned int selector,
+ char *buf, int size)
+{
+ snprintf(buf, size, "%s", sandbox_pins_muxing[selector]);
+
+ return 0;
+}
+
static int sandbox_get_groups_count(struct udevice *dev)
{
return ARRAY_SIZE(sandbox_groups);
const struct pinctrl_ops sandbox_pinctrl_ops = {
.get_pins_count = sandbox_get_pins_count,
.get_pin_name = sandbox_get_pin_name,
+ .get_pin_muxing = sandbox_get_pin_muxing,
.get_groups_count = sandbox_get_groups_count,
.get_group_name = sandbox_get_group_name,
.get_functions_count = sandbox_get_functions_count,