^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) * TI SYSCON regmap reset driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Copyright (C) 2015-2016 Texas Instruments Incorporated - https://www.ti.com/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Andrew F. Davis <afd@ti.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Suman Anna <afd@ti.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * This program is free software; you can redistribute it and/or modify
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * it under the terms of the GNU General Public License version 2 as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) * published by the Free Software Foundation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) * This program is distributed "as is" WITHOUT ANY WARRANTY of any
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) * kind, whether express or implied; without even the implied warranty
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) * GNU General Public License for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #include <linux/mfd/syscon.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #include <linux/of.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #include <linux/platform_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #include <linux/regmap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #include <linux/reset-controller.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #include <dt-bindings/reset/ti-syscon.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) * struct ti_syscon_reset_control - reset control structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) * @assert_offset: reset assert control register offset from syscon base
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) * @assert_bit: reset assert bit in the reset assert control register
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) * @deassert_offset: reset deassert control register offset from syscon base
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) * @deassert_bit: reset deassert bit in the reset deassert control register
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) * @status_offset: reset status register offset from syscon base
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) * @status_bit: reset status bit in the reset status register
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) * @flags: reset flag indicating how the (de)assert and status are handled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) struct ti_syscon_reset_control {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) unsigned int assert_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) unsigned int assert_bit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) unsigned int deassert_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) unsigned int deassert_bit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) unsigned int status_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) unsigned int status_bit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) u32 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) * struct ti_syscon_reset_data - reset controller information structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) * @rcdev: reset controller entity
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) * @regmap: regmap handle containing the memory-mapped reset registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) * @controls: array of reset controls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) * @nr_controls: number of controls in control array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) struct ti_syscon_reset_data {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) struct reset_controller_dev rcdev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) struct regmap *regmap;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) struct ti_syscon_reset_control *controls;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) unsigned int nr_controls;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) #define to_ti_syscon_reset_data(_rcdev) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) container_of(_rcdev, struct ti_syscon_reset_data, rcdev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) * ti_syscon_reset_assert() - assert device reset
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) * @rcdev: reset controller entity
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) * @id: ID of the reset to be asserted
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) * This function implements the reset driver op to assert a device's reset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) * This asserts the reset in a manner prescribed by the reset flags.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) * Return: 0 for successful request, else a corresponding error value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) static int ti_syscon_reset_assert(struct reset_controller_dev *rcdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) unsigned long id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) struct ti_syscon_reset_data *data = to_ti_syscon_reset_data(rcdev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) struct ti_syscon_reset_control *control;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) unsigned int mask, value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) if (id >= data->nr_controls)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) control = &data->controls[id];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) if (control->flags & ASSERT_NONE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) return -ENOTSUPP; /* assert not supported for this reset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) mask = BIT(control->assert_bit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) value = (control->flags & ASSERT_SET) ? mask : 0x0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) return regmap_update_bits(data->regmap, control->assert_offset, mask, value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) * ti_syscon_reset_deassert() - deassert device reset
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) * @rcdev: reset controller entity
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) * @id: ID of reset to be deasserted
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) * This function implements the reset driver op to deassert a device's reset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) * This deasserts the reset in a manner prescribed by the reset flags.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) * Return: 0 for successful request, else a corresponding error value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) static int ti_syscon_reset_deassert(struct reset_controller_dev *rcdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) unsigned long id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) struct ti_syscon_reset_data *data = to_ti_syscon_reset_data(rcdev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) struct ti_syscon_reset_control *control;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) unsigned int mask, value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) if (id >= data->nr_controls)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) control = &data->controls[id];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) if (control->flags & DEASSERT_NONE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) return -ENOTSUPP; /* deassert not supported for this reset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) mask = BIT(control->deassert_bit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) value = (control->flags & DEASSERT_SET) ? mask : 0x0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) return regmap_update_bits(data->regmap, control->deassert_offset, mask, value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) * ti_syscon_reset_status() - check device reset status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) * @rcdev: reset controller entity
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) * @id: ID of the reset for which the status is being requested
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) * This function implements the reset driver op to return the status of a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) * device's reset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) * Return: 0 if reset is deasserted, true if reset is asserted, else a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) * corresponding error value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) static int ti_syscon_reset_status(struct reset_controller_dev *rcdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) unsigned long id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) struct ti_syscon_reset_data *data = to_ti_syscon_reset_data(rcdev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) struct ti_syscon_reset_control *control;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) unsigned int reset_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) int ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) if (id >= data->nr_controls)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) control = &data->controls[id];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) if (control->flags & STATUS_NONE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) return -ENOTSUPP; /* status not supported for this reset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) ret = regmap_read(data->regmap, control->status_offset, &reset_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) return !(reset_state & BIT(control->status_bit)) ==
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) !(control->flags & STATUS_SET);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) static const struct reset_control_ops ti_syscon_reset_ops = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) .assert = ti_syscon_reset_assert,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) .deassert = ti_syscon_reset_deassert,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) .status = ti_syscon_reset_status,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) static int ti_syscon_reset_probe(struct platform_device *pdev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) struct device *dev = &pdev->dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) struct device_node *np = dev->of_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) struct ti_syscon_reset_data *data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) struct regmap *regmap;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) const __be32 *list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) struct ti_syscon_reset_control *controls;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) int size, nr_controls, i;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) if (!data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) regmap = syscon_node_to_regmap(np->parent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) if (IS_ERR(regmap))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) return PTR_ERR(regmap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) list = of_get_property(np, "ti,reset-bits", &size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) if (!list || (size / sizeof(*list)) % 7 != 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) dev_err(dev, "invalid DT reset description\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) nr_controls = (size / sizeof(*list)) / 7;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) controls = devm_kcalloc(dev, nr_controls, sizeof(*controls),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) if (!controls)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) for (i = 0; i < nr_controls; i++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) controls[i].assert_offset = be32_to_cpup(list++);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) controls[i].assert_bit = be32_to_cpup(list++);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) controls[i].deassert_offset = be32_to_cpup(list++);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) controls[i].deassert_bit = be32_to_cpup(list++);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) controls[i].status_offset = be32_to_cpup(list++);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) controls[i].status_bit = be32_to_cpup(list++);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) controls[i].flags = be32_to_cpup(list++);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) data->rcdev.ops = &ti_syscon_reset_ops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) data->rcdev.owner = THIS_MODULE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) data->rcdev.of_node = np;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) data->rcdev.nr_resets = nr_controls;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) data->regmap = regmap;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) data->controls = controls;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) data->nr_controls = nr_controls;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) platform_set_drvdata(pdev, data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) return devm_reset_controller_register(dev, &data->rcdev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) static const struct of_device_id ti_syscon_reset_of_match[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) { .compatible = "ti,syscon-reset", },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) { /* sentinel */ },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) MODULE_DEVICE_TABLE(of, ti_syscon_reset_of_match);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) static struct platform_driver ti_syscon_reset_driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) .probe = ti_syscon_reset_probe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) .driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) .name = "ti-syscon-reset",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) .of_match_table = ti_syscon_reset_of_match,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) module_platform_driver(ti_syscon_reset_driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) MODULE_AUTHOR("Andrew F. Davis <afd@ti.com>");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) MODULE_AUTHOR("Suman Anna <s-anna@ti.com>");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) MODULE_DESCRIPTION("TI SYSCON Regmap Reset Driver");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) MODULE_LICENSE("GPL v2");