| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * External Connector (extcon) framework |
|---|
| 3 | 4 | * - linux/include/linux/extcon-provider.h for extcon provider device driver. |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Copyright (C) 2017 Samsung Electronics |
|---|
| 6 | 7 | * Author: Chanwoo Choi <cw00.choi@samsung.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This software is licensed under the terms of the GNU General Public |
|---|
| 9 | | - * License version 2, as published by the Free Software Foundation, and |
|---|
| 10 | | - * may be copied, distributed, and modified under those terms. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | | - * GNU General Public License for more details. |
|---|
| 16 | 8 | */ |
|---|
| 17 | 9 | |
|---|
| 18 | 10 | #ifndef __LINUX_EXTCON_PROVIDER_H__ |
|---|
| .. | .. |
|---|
| 25 | 17 | #if IS_ENABLED(CONFIG_EXTCON) |
|---|
| 26 | 18 | |
|---|
| 27 | 19 | /* Following APIs register/unregister the extcon device. */ |
|---|
| 28 | | -extern int extcon_dev_register(struct extcon_dev *edev); |
|---|
| 29 | | -extern void extcon_dev_unregister(struct extcon_dev *edev); |
|---|
| 30 | | -extern int devm_extcon_dev_register(struct device *dev, |
|---|
| 20 | +int extcon_dev_register(struct extcon_dev *edev); |
|---|
| 21 | +void extcon_dev_unregister(struct extcon_dev *edev); |
|---|
| 22 | +int devm_extcon_dev_register(struct device *dev, |
|---|
| 31 | 23 | struct extcon_dev *edev); |
|---|
| 32 | | -extern void devm_extcon_dev_unregister(struct device *dev, |
|---|
| 24 | +void devm_extcon_dev_unregister(struct device *dev, |
|---|
| 33 | 25 | struct extcon_dev *edev); |
|---|
| 34 | 26 | |
|---|
| 35 | 27 | /* Following APIs allocate/free the memory of the extcon device. */ |
|---|
| 36 | | -extern struct extcon_dev *extcon_dev_allocate(const unsigned int *cable); |
|---|
| 37 | | -extern void extcon_dev_free(struct extcon_dev *edev); |
|---|
| 38 | | -extern struct extcon_dev *devm_extcon_dev_allocate(struct device *dev, |
|---|
| 28 | +struct extcon_dev *extcon_dev_allocate(const unsigned int *cable); |
|---|
| 29 | +void extcon_dev_free(struct extcon_dev *edev); |
|---|
| 30 | +struct extcon_dev *devm_extcon_dev_allocate(struct device *dev, |
|---|
| 39 | 31 | const unsigned int *cable); |
|---|
| 40 | | -extern void devm_extcon_dev_free(struct device *dev, struct extcon_dev *edev); |
|---|
| 32 | +void devm_extcon_dev_free(struct device *dev, struct extcon_dev *edev); |
|---|
| 41 | 33 | |
|---|
| 42 | 34 | /* Synchronize the state and property value for each external connector. */ |
|---|
| 43 | | -extern int extcon_sync(struct extcon_dev *edev, unsigned int id); |
|---|
| 35 | +int extcon_sync(struct extcon_dev *edev, unsigned int id); |
|---|
| 44 | 36 | |
|---|
| 45 | 37 | /* |
|---|
| 46 | 38 | * Following APIs set the connected state of each external connector. |
|---|
| 47 | 39 | * The 'id' argument indicates the defined external connector. |
|---|
| 48 | 40 | */ |
|---|
| 49 | | -extern int extcon_set_state(struct extcon_dev *edev, unsigned int id, |
|---|
| 41 | +int extcon_set_state(struct extcon_dev *edev, unsigned int id, |
|---|
| 50 | 42 | bool state); |
|---|
| 51 | | -extern int extcon_set_state_sync(struct extcon_dev *edev, unsigned int id, |
|---|
| 43 | +int extcon_set_state_sync(struct extcon_dev *edev, unsigned int id, |
|---|
| 52 | 44 | bool state); |
|---|
| 53 | 45 | |
|---|
| 54 | 46 | /* |
|---|
| .. | .. |
|---|
| 60 | 52 | * for each external connector. They are used to set the capability of the |
|---|
| 61 | 53 | * property of each external connector based on the id and property. |
|---|
| 62 | 54 | */ |
|---|
| 63 | | -extern int extcon_set_property(struct extcon_dev *edev, unsigned int id, |
|---|
| 55 | +int extcon_set_property(struct extcon_dev *edev, unsigned int id, |
|---|
| 64 | 56 | unsigned int prop, |
|---|
| 65 | 57 | union extcon_property_value prop_val); |
|---|
| 66 | | -extern int extcon_set_property_sync(struct extcon_dev *edev, unsigned int id, |
|---|
| 58 | +int extcon_set_property_sync(struct extcon_dev *edev, unsigned int id, |
|---|
| 67 | 59 | unsigned int prop, |
|---|
| 68 | 60 | union extcon_property_value prop_val); |
|---|
| 69 | | -extern int extcon_set_property_capability(struct extcon_dev *edev, |
|---|
| 61 | +int extcon_set_property_capability(struct extcon_dev *edev, |
|---|
| 70 | 62 | unsigned int id, unsigned int prop); |
|---|
| 71 | 63 | |
|---|
| 72 | 64 | #else /* CONFIG_EXTCON */ |
|---|