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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 31 Aug 2012 12:20:00 +0100
From:	Krystian Garbaciak <krystian.garbaciak@...semi.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	<linux-kernel@...r.kernel.org>, <rtc-linux@...glegroups.com>,
	<lm-sensors@...sensors.org>, <linux-input@...r.kernel.org>,
	<linux-watchdog@...r.kernel.org>, <linux-leds@...r.kernel.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Liam Girdwood <lrg@...com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	Jean Delvare <khali@...ux-fr.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Ashish Jangam <ashish.jangam@...tcummins.com>,
	Andrew Jones <drjones@...hat.com>,
	Donggeun Kim <dg77.kim@...sung.com>,
	Philippe Rétornaz <philippe.retornaz@...l.ch>,
	"Wim Van Sebroeck" <wim@...ana.be>,
	Bryan Wu <bryan.wu@...onical.com>,
	Richard Purdie <rpurdie@...ys.net>,
	Anthony Olech <anthony.olech@...semi.com>
Subject: Re: [PATCH 1/8] mfd: Add Dialog DA906x core driver.

> On Fri, Aug 24, 2012 at 02:50:00PM +0100, Krystian Garbaciak wrote:
> 
> > This is MFD module providing access to registers and interrupts of DA906x
> > series PMIC. It is used by other functional modules, registered as MFD cells.
> > Driver uses regmap with paging to access extended register list. Register map
> > is divided into two pages, where the second page is used during initialisation.
> 
> Your selection of people to CC here appears both large and random...

I've added any maintainer for my modules from maintainer list.

> > +inline unsigned int da906x_to_range_reg(u16 reg)
> > +{
> > +	return reg + DA906X_MAPPING_BASE;
> > +}
> 
> I've no real idea what this stuff is all about, it at least needs some
> comments somewhere.  The fact that you're just adding a constant offset
> to all registers is at best odd.

I will comment it precisely for next version:

+/* Adding virtual register range starting from address DA9063_MAPPING_BASE.
+   It will be used for registers requiring page switching, which in our case
+   are virtually all PMIC registers.
+   Registers from 0 to 255 are used only as a page window and are volatile,
+   except DA9063_REG_PAGE_CON register (page selector), which is cachable. */
+static const struct regmap_range_cfg da9063_range_cfg[] = {
+	{
+		.range_min = DA9063_MAPPING_BASE,
+		.range_max = DA9063_MAPPING_BASE +
+			     ARRAY_SIZE(da9063_reg_flg) - 1,
+		.selector_reg = DA9063_REG_PAGE_CON,
+		.selector_mask = 1 << DA9063_I2C_PAGE_SEL_SHIFT,
+		.selector_shift = DA9063_I2C_PAGE_SEL_SHIFT,
+		.window_start = 0,
+		.window_len = 256,
+	}
+};

.. and here:

+/* Access to any PMIC register is passed through virtual register range,
+   starting at DA9063_MAPPING_BASE. For those registers, paging is required. */
+inline unsigned int da9063_to_range_reg(u16 reg)
+{
+	return reg + DA9063_MAPPING_BASE;
+}

--
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