[PATCH 1/9] reset: add the Berlin reset controller driver

Philipp Zabel pza at pengutronix.de
Mon Jun 9 04:23:11 PDT 2014


Hi Sebastian,

On Mon, Jun 09, 2014 at 12:32:50PM +0200, Sebastian Hesselbarth wrote:
> I currently have no way to look it up myself, but is reset API providing
> a way to deal with phandle+specifier with more than one parameter?

You could provide a custom rcdev->of_xlate callback and encode
multiple phandle args into the reset line "index".

static int of_reset_xlate(struct reset_controller_dev *rcdev,
                          const struct of_phandle_args *reset_spec)
{
	return reset_spec->args[0] * 32 + reset_spec->args[1];
}

> Chip-ctrl has a bunch of other reset bits spread over the regset, having
> the offset encoded in the specifier would save us some SoC specific
> boiler plate, i.e.
> 
> reset = <&chip 0x104 14>;

That should be possible.

regards
Philipp



More information about the linux-arm-kernel mailing list