lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151103143636.GA8350@localhost>
Date:	Tue, 3 Nov 2015 09:36:38 -0500
From:	Damien Riegel <damien.riegel@...oirfairelinux.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Lee Jones <lee.jones@...aro.org>, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-watchdog@...r.kernel.org, shawnguo@...nel.org,
	kernel@...gutronix.de, wim@...ana.be, robh+dt@...nel.org,
	sameo@...ux.intel.com, dinh.linux@...il.com, linux@...ck-us.net,
	kernel@...oirfairelinux.com
Subject: Re: [PATCH v2 2/5] mfd: ts4800-syscon: add driver for TS-4800 syscon

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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ