mfd: cros_ec: Fail early if we cannot identify the EC
authorVincent Palatin <vpalatin@chromium.org>
Wed, 18 Apr 2018 10:23:58 +0000 (12:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:50:27 +0000 (07:50 +0200)
commit6648fdc71138caf906bfa0a96b383a7d0dee270f
tree988724df3a00205ab9bbe4fcf0970212c7c08747
parent3d4837733945a7d9505fd08db34b4188ca59e854
mfd: cros_ec: Fail early if we cannot identify the EC

[ Upstream commit 0dbbf25561b29ffab5ba6277429760abdf49ceff ]

If we cannot communicate with the EC chip to detect the protocol version
and its features, it's very likely useless to continue. Else we will
commit all kind of uninformed mistakes (using the wrong protocol, the
wrong buffer size, mixing the EC with other chips).

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Acked-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mfd/cros_ec.c