History log of /linux-master/drivers/platform/chrome/cros_ec_lpc_mec.c
Revision Date Author Comments
# 9888feb9 30-Oct-2022 Tzung-Bi Shih <tzungbi@kernel.org>

platform/chrome: cros_ec_lpc_mec: remove cros_ec_lpc_mec_destroy()

It's pointless (and invalid) to destroy a statically allocated mutex in
cros_ec_lpc_mec_destroy().

Let's remove it.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20221031050657.3899359-1-tzungbi@kernel.org


# d61b3f9b 09-Apr-2021 Ye Bin <yebin10@huawei.com>

platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock

mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20210409095138.2293869-1-yebin10@huawei.com


# 9eecd07b 14-Jun-2019 Enric Balletbo i Serra <enric.balletbo@collabora.com>

platform/chrome: cros_ec_lpc_mec: Fix kernel-doc comment first line

kernel-doc comments have a prescribed format. To be _particularly_ correct
we should also capitalise the brief description and terminate it with a
period.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Nick Crews <ncrews@chromium.org>


# 6b7cb222 08-Feb-2019 Nick Crews <ncrews@chromium.org>

platform/chrome: cros_ec: Remove cros_ec dependency in lpc_mec

In order to allow this code to be re-used, remove the dependency
on the rest of the cros_ec code from the cros_ec_lpc_mec functions.

Instead of using a hardcoded register base address of 0x800 have
this be passed in to cros_ec_lpc_mec_init(). The existing cros_ec
use case now passes in the 0x800 base address this way.

There are some error checks that happen in cros_ec_lpc_mec_in_range()
that probably shouldn't be there, as they are checking kernel-space
callers and not user-space input. However, we'll just do the refactor in
this patch, and in a future patch might remove this error checking and
fix all the instances of code that calls this.

There's a similar problem in cros_ec_lpc_read_bytes(), where we return a
checksum, but on error just return 0. This should probably be changed so
that it returns int, but we don't want to have to mess with all the
calling code for this fix. Maybe we'll come back through later and fix
this.

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Signed-off-by: Nick Crews <ncrews@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>


# 1058ca94 29-Jan-2019 Enric Balletbo i Serra <enric.balletbo@collabora.com>

platform/chrome: cros_ec_lpc: switch to SPDX identifier

Adopt the SPDX license identifier headers to ease license compliance
management. Also remove the license boiler-plate and redundant driver
description.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>


# cc8a4ea1 18-Jul-2018 Enric Balletbo i Serra <enric.balletbo@collabora.com>

platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform.

The cros-ec-lpc driver lives in drivers/platform because is platform
specific, however there are two includes (cros_ec_lpc_mec.h and
cros_ec_lpc_reg.h) that lives in include/linux/mfd. These two includes
are only used for the platform driver and are not really related to the
MFD subsystem, so move the includes from include/linux/mfd to
drivers/platform/chrome.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Benson Leung <bleung@chromium.org>


# 8d4a3dc4 16-May-2017 Shawn Nematbakhsh <shawnn@chromium.org>

platform/chrome: cros_ec_lpc: Add support for mec1322 EC

This adds support for the ChromeOS LPC Microchip Embedded Controller
(mec1322) variant.

mec1322 accesses I/O region [800h, 9ffh] through embedded memory
interface (EMI) rather than LPC.

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Benson Leung <bleung@chromium.org>