regmap: Updates for v4.18
This is another quiet release for regmap, there's one minor feature improvement for the recently added slimbus support and a few minor fixes and cleanups. -----BEGIN PGP SIGNATURE----- iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlsVHRITHGJyb29uaWVA a2VybmVsLm9yZwAKCRAk1otyXVSH0CyMB/4s5liPn80YEm7nVyWyguc10PlE19XJ OvW88wp4ENv6SvKUyzH3xbsfwaaqBz7vdkofjDEtXawJjCj0Q4YQ3h4Vmn94CstD 51zUoGpUN4xvBlrLcb0EA77OEMhJTrWKrmZgSyA6nOeZtnz1AIOY8qm1k1lE0mVu Cy7H++GDLKtYBu7fzfxC/txEmexsg9/6aVdUHL5Tt79RvCIVQJHgwsIfTBZZHDrh o7WK4CN3e9FBz4oJMfPTDdy4KruWz20EYu6PNMV5+Dr2zQZ4hAzElMi4l0dFLSOE h6a6TexcvXXiD+z5Ie3Ji3PliW35buPFC+W6UHoGI+CL4+aUN/03+zKz =oz6l -----END PGP SIGNATURE----- Merge tag 'regmap-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This is another quiet release for regmap, there's one minor feature improvement for the recently added slimbus support and a few minor fixes and cleanups" * tag 'regmap-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: slimbus: allow register offsets up to 16 bits regmap: add missing prototype for devm_init_slimbus regmap: Skip clk_put for attached clocks when freeing context regmap: include <linux/ktime.h> from include/linux/regmap.h
This commit is contained in:
commit
a31895ad7f
|
@ -206,6 +206,7 @@ static void regmap_mmio_free_context(void *context)
|
||||||
|
|
||||||
if (!IS_ERR(ctx->clk)) {
|
if (!IS_ERR(ctx->clk)) {
|
||||||
clk_unprepare(ctx->clk);
|
clk_unprepare(ctx->clk);
|
||||||
|
if (!ctx->attached_clk)
|
||||||
clk_put(ctx->clk);
|
clk_put(ctx->clk);
|
||||||
}
|
}
|
||||||
kfree(context);
|
kfree(context);
|
||||||
|
|
|
@ -41,7 +41,7 @@ static struct regmap_bus regmap_slimbus_bus = {
|
||||||
static const struct regmap_bus *regmap_get_slimbus(struct slim_device *slim,
|
static const struct regmap_bus *regmap_get_slimbus(struct slim_device *slim,
|
||||||
const struct regmap_config *config)
|
const struct regmap_config *config)
|
||||||
{
|
{
|
||||||
if (config->val_bits == 8 && config->reg_bits == 8)
|
if (config->val_bits == 8 && config->reg_bits == 16)
|
||||||
return ®map_slimbus_bus;
|
return ®map_slimbus_bus;
|
||||||
|
|
||||||
return ERR_PTR(-ENOTSUPP);
|
return ERR_PTR(-ENOTSUPP);
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <linux/rbtree.h>
|
#include <linux/rbtree.h>
|
||||||
|
#include <linux/ktime.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/bug.h>
|
#include <linux/bug.h>
|
||||||
|
@ -587,7 +588,10 @@ struct regmap *__devm_regmap_init_sdw(struct sdw_slave *sdw,
|
||||||
const struct regmap_config *config,
|
const struct regmap_config *config,
|
||||||
struct lock_class_key *lock_key,
|
struct lock_class_key *lock_key,
|
||||||
const char *lock_name);
|
const char *lock_name);
|
||||||
|
struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus,
|
||||||
|
const struct regmap_config *config,
|
||||||
|
struct lock_class_key *lock_key,
|
||||||
|
const char *lock_name);
|
||||||
/*
|
/*
|
||||||
* Wrapper for regmap_init macros to include a unique lockdep key and name
|
* Wrapper for regmap_init macros to include a unique lockdep key and name
|
||||||
* for each call. No-op if CONFIG_LOCKDEP is not set.
|
* for each call. No-op if CONFIG_LOCKDEP is not set.
|
||||||
|
@ -906,6 +910,19 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
|
||||||
__regmap_lockdep_wrapper(__devm_regmap_init_sdw, #config, \
|
__regmap_lockdep_wrapper(__devm_regmap_init_sdw, #config, \
|
||||||
sdw, config)
|
sdw, config)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* devm_regmap_init_slimbus() - Initialise managed register map
|
||||||
|
*
|
||||||
|
* @slimbus: Device that will be interacted with
|
||||||
|
* @config: Configuration for register map
|
||||||
|
*
|
||||||
|
* The return value will be an ERR_PTR() on error or a valid pointer
|
||||||
|
* to a struct regmap. The regmap will be automatically freed by the
|
||||||
|
* device management code.
|
||||||
|
*/
|
||||||
|
#define devm_regmap_init_slimbus(slimbus, config) \
|
||||||
|
__regmap_lockdep_wrapper(__devm_regmap_init_slimbus, #config, \
|
||||||
|
slimbus, config)
|
||||||
int regmap_mmio_attach_clk(struct regmap *map, struct clk *clk);
|
int regmap_mmio_attach_clk(struct regmap *map, struct clk *clk);
|
||||||
void regmap_mmio_detach_clk(struct regmap *map);
|
void regmap_mmio_detach_clk(struct regmap *map);
|
||||||
void regmap_exit(struct regmap *map);
|
void regmap_exit(struct regmap *map);
|
||||||
|
|
Loading…
Reference in a new issue