02 Sep, 2019
1 commit
-
There is a bit of mess between cros-ec mfd includes and platform
includes. For example, we have a linux/mfd/cros_ec.h include that
exports the interface implemented in platform/chrome/cros_ec_proto.c. Or
we have a linux/mfd/cros_ec_commands.h file that is non related to the
multifunction device (in the sense that is not exporting any function of
the mfd device). This causes crossed includes between mfd and
platform/chrome subsystems and makes the code difficult to read, apart
from creating 'curious' situations where a platform/chrome driver includes
a linux/mfd/cros_ec.h file just to get the exported functions that are
implemented in another platform/chrome driver.In order to have a better separation on what the cros-ec multifunction
driver does and what the cros-ec core provides move and rework the
affected includes doing:- Move cros_ec_commands.h to include/linux/platform_data/cros_ec_commands.h
- Get rid of the parts that are implemented in the platform/chrome/cros_ec_proto.c
driver from include/linux/mfd/cros_ec.h to a new file
include/linux/platform_data/cros_ec_proto.h
- Update all the drivers with the new includes, so
- Drivers that only need to know about the protocol include
- linux/platform_data/cros_ec_proto.h
- linux/platform_data/cros_ec_commands.h
- Drivers that need to know about the cros-ec mfd device also include
- linux/mfd/cros_ec.hSigned-off-by: Enric Balletbo i Serra
Acked-by: Andy Shevchenko
Acked-by: Mark Brown
Acked-by: Wolfram Sang
Acked-by: Neil Armstrong
Acked-by: Alexandre Belloni
Acked-by: Jonathan Cameron
Acked-by: Benjamin Tissoires
Acked-by: Dmitry Torokhov
Acked-by: Sebastian Reichel
Acked-by: Chanwoo Choi
Reviewed-by: Gwendal Grignou
Tested-by: Gwendal Grignou
Series changes: 3
- Fix dereferencing pointer to incomplete type 'struct cros_ec_dev' (lkp)
Signed-off-by: Lee Jones
12 Jul, 2018
2 commits
-
Adopt the SPDX license identifier headers to ease license compliance
management.Signed-off-by: Enric Balletbo i Serra
Signed-off-by: Chanwoo Choi -
The license text is specifying "GPLv2" but the MODULE_LICENSE is set to
GPL which means GNU Public License v2 or later. When MODULE_LICENSE and
boiler plate does not match, go for boiler plate license.Signed-off-by: Enric Balletbo i Serra
Signed-off-by: Chanwoo Choi
15 Dec, 2017
1 commit
-
Extend the driver to notify host and device type cables and the presence
of power.Signed-off-by: Benson Leung
Signed-off-by: Enric Balletbo i Serra
Reviewed-by: Chanwoo Choi
Acked-by: Lee Jones
Signed-off-by: Chanwoo Choi
23 Oct, 2017
1 commit
-
The extcon has two type of extcon devices as following.
- 'extcon provider deivce' adds new extcon device and detect the
state/properties of external connector. Also, it notifies the
state/properties to the extcon consumer device.
- 'extcon consumer device' gets the change state/properties
from extcon provider device.
Prior to that, include/linux/extcon.h contains all exported API for
both provider and consumer device driver. To clarify the meaning of
header file and to remove the wrong use-case on consumer device,
this patch separates into extcon.h and extcon-provider.h.[Description for include/linux/{extcon.h|extcon-provider.h}]
- extcon.h includes the extcon API and data structure for extcon consumer
device driver. This header file contains the following APIs:
: Register/unregister the notifier to catch the change of extcon device
: Get the extcon device instance
: Get the extcon device name
: Get the state of each external connector
: Get the property value of each external connector
: Get the property capability of each external connector- extcon-provider.h includes the extcon API and data structure for extcon
provider device driver. This header file contains the following APIs:
: Include 'include/linux/extcon.h'
: Allocate the memory for extcon device instance
: Register/unregister extcon device
: Set the state of each external connector
: Set the property value of each external connector
: Set the property capability of each external connectorSigned-off-by: Chanwoo Choi
Acked-by: Sebastian Reichel
Acked-by: Chen-Yu Tsai
Acked-by: Charles Keepax
Acked-by: Lee Jones
Acked-by: Felipe Balbi
Acked-by: Yoshihiro Shimoda
Acked-by: Kishon Vijay Abraham I
07 Aug, 2017
1 commit
-
Return -ENOMEM in case of memory allocation failure. This avoids a NULL
pointer dereference.Fixes: c69831666109 ("extcon: cros-ec: Add extcon-cros-ec driver to support display out")
Signed-off-by: Christophe JAILLET
Signed-off-by: Chanwoo Choi
17 Jul, 2017
1 commit
-
This is the driver for the USB Type C cable detection mechanism
built into the ChromeOS Embedded Controller on systems that
have USB Type-C ports.At present, this allows for the presence of display out, but in
future, it may also be used to notify host and device type cables
and the presence of power.Signed-off-by: Benson Leung
Signed-off-by: Enric Balletbo i Serra
Acked-by: Chanwoo Choi
Acked-by: Lee Jones
Signed-off-by: Chanwoo Choi