| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * System Control Driver |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * Copyright (C) 2012 Linaro Ltd. |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Author: Dong Aisheng <dong.aisheng@linaro.org> |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 11 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 12 | | - * (at your option) any later version. |
|---|
| 13 | 9 | */ |
|---|
| 14 | 10 | |
|---|
| 15 | 11 | #ifndef __LINUX_MFD_SYSCON_H__ |
|---|
| .. | .. |
|---|
| 21 | 17 | struct device_node; |
|---|
| 22 | 18 | |
|---|
| 23 | 19 | #ifdef CONFIG_MFD_SYSCON |
|---|
| 20 | +extern struct regmap *device_node_to_regmap(struct device_node *np); |
|---|
| 24 | 21 | extern struct regmap *syscon_node_to_regmap(struct device_node *np); |
|---|
| 25 | 22 | extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s); |
|---|
| 26 | | -extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s); |
|---|
| 27 | 23 | extern struct regmap *syscon_regmap_lookup_by_phandle( |
|---|
| 28 | 24 | struct device_node *np, |
|---|
| 29 | 25 | const char *property); |
|---|
| 26 | +extern struct regmap *syscon_regmap_lookup_by_phandle_args( |
|---|
| 27 | + struct device_node *np, |
|---|
| 28 | + const char *property, |
|---|
| 29 | + int arg_count, |
|---|
| 30 | + unsigned int *out_args); |
|---|
| 30 | 31 | #else |
|---|
| 32 | +static inline struct regmap *device_node_to_regmap(struct device_node *np) |
|---|
| 33 | +{ |
|---|
| 34 | + return ERR_PTR(-ENOTSUPP); |
|---|
| 35 | +} |
|---|
| 36 | + |
|---|
| 31 | 37 | static inline struct regmap *syscon_node_to_regmap(struct device_node *np) |
|---|
| 32 | 38 | { |
|---|
| 33 | 39 | return ERR_PTR(-ENOTSUPP); |
|---|
| .. | .. |
|---|
| 38 | 44 | return ERR_PTR(-ENOTSUPP); |
|---|
| 39 | 45 | } |
|---|
| 40 | 46 | |
|---|
| 41 | | -static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s) |
|---|
| 47 | +static inline struct regmap *syscon_regmap_lookup_by_phandle( |
|---|
| 48 | + struct device_node *np, |
|---|
| 49 | + const char *property) |
|---|
| 42 | 50 | { |
|---|
| 43 | 51 | return ERR_PTR(-ENOTSUPP); |
|---|
| 44 | 52 | } |
|---|
| 45 | 53 | |
|---|
| 46 | | -static inline struct regmap *syscon_regmap_lookup_by_phandle( |
|---|
| 54 | +static inline struct regmap *syscon_regmap_lookup_by_phandle_args( |
|---|
| 47 | 55 | struct device_node *np, |
|---|
| 48 | | - const char *property) |
|---|
| 56 | + const char *property, |
|---|
| 57 | + int arg_count, |
|---|
| 58 | + unsigned int *out_args) |
|---|
| 49 | 59 | { |
|---|
| 50 | 60 | return ERR_PTR(-ENOTSUPP); |
|---|
| 51 | 61 | } |
|---|