Re: [PATCH v2 2/5] mfd: ts4800-syscon: add driver for TS-4800 syscon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 03, 2015 at 11:48:38AM +0100, Arnd Bergmann wrote:
> On Tuesday 03 November 2015 10:12:17 Lee Jones wrote:
> > > 
> > > I think a 'buswidth=<16>;' property in addition to 'compatible="syscon"'
> > > is more in line with what other subsystems do.
> > 
> > Perfect.
> > 
> 
> Just to clarify: I just checked the other DT bindings and it should
> actually be "bus-width", not "buswidth".

Actually, I need the set the three following values of regmap_config:
reg_bits, reg_stride, and val_bits.

I had the following mapping in mind:

@@ -69,6 +70,18 @@ static struct syscon *of_syscon_register(struct device_node *np)
         else if (of_property_read_bool(np, "little-endian"))
                syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE;
 
+       ret = of_property_read_u32(np, "reg-bits", &val);
+       if (!ret)
+               syscon_config.reg_bits = val;
+
+       ret = of_property_read_u32(np, "val-bits", &val);
+       if (!ret)
+               syscon_config.val_bits = val;
+
+       ret = of_property_read_u32(np, "reg-stride", &val);
+       if (!ret)
+               syscon_config.reg_stride = val;
+
        regmap = regmap_init_mmio(NULL, base, &syscon_config);
        if (IS_ERR(regmap)) {
                pr_err("regmap init failed\n");


Would you prefer other property names, like "reg-bus-width",
"val-bus-width", and "reg-stride"? Should I prefix them with "syscon,"?


	Damien
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux