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]
Message-ID: <20110907174713.GG2906@opensource.wolfsonmicro.com>
Date:	Wed, 7 Sep 2011 10:47:14 -0700
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Jonathan Cameron <jic23@....ac.uk>
Cc:	linux-kernel@...r.kernel.org, Michael.Hennerich@...log.com,
	linux-iio@...r.kernel.org
Subject: Re: [PATCH 2/6] regmap: Add a magic bus type to handle quirks of
 analog devices ADIS sensors.

On Wed, Sep 07, 2011 at 05:19:43PM +0100, Jonathan Cameron wrote:
> These devices look like 8 bit registers for writes and 16 bit registers for
> reads.  As you might imagine this causes some 'issues' hence this regmap
> bus implementation claims they are always 16bit and does the mangling to
> make the writes work.
> ---

You've not signed this off.  To be honest I'm not terribly happy about
pushing this into the regmap core code; if we start needing to do stuff
like this we should expose the bus interface.

> +
> +static int regmap_spi_write(struct device *dev, const void *data, size_t count)
> +{
> +/* Now this only works for 8 bit addresss 16 bit register first byte of data
> + * is the lower address, second two the value */
> +	struct spi_device *spi = to_spi_device(dev);
> +	int ret;

Indentation.

> +static struct regmap_bus regmap_spi_adi = {
> +	.write = regmap_spi_write,
> +	.read = regmap_spi_read,
> +};

You want to implement the gather write too if you can.
--
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