User: Password:
|
|
Subscribe / Log in / New account

regmap: support regmap over SMBus

From:  Boris BREZILLON <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To:  Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
Subject:  [PATCH v2 0/2] regmap: support regmap over SMBus
Date:  Thu, 17 Apr 2014 11:40:10 +0200
Message-ID:  <1397727612-32103-1-git-send-email-boris.brezillon@free-electrons.com>
Cc:  Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>, Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>, Shuge <shuge-0TFLnhJekD6UEPyfVivIlAC/G2K4zDHf@public.gmane.org>, kevin-0TFLnhJekD6UEPyfVivIlAC/G2K4zDHf@public.gmane.org, Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>, Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dev-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org, Boris BREZILLON <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Archive-link:  Article

Hello,

This patch series adds support for remap over SMBus in case your i2c
adapter does not support regular I2C transfers.

SMBus is a subset of the I2C protocol, often used to access registers
on external devices.

I2C adapters are able to access SMBus devices thanks to the SMBus
emulation layer. In the other hand SMBus adapters may not provide
regular I2C transfers, and thus you may not be able to expose a regmap
if your device is connected to such kind of adapter.
Hence why we need this regmap over SMBus implementation.

Best Regards,

Boris

Changes since v1:
 - add reg_read/reg_write callbacks to the regmap_bus struct

Boris BREZILLON (2):
  regmap: add reg_read/reg_write callbacks to regmap_bus struct
  regmap: i2c: fallback to SMBus if the adapter does not support
    standard I2C

 drivers/base/regmap/regmap-i2c.c | 104 ++++++++++++++++++++++++++++++++++++++-
 drivers/base/regmap/regmap.c     |  26 ++++++++++
 include/linux/regmap.h           |   6 +++
 3 files changed, 134 insertions(+), 2 deletions(-)

-- 
1.8.3.2



Copyright © 2014, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds