lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 11 Jun 2014 08:11:44 -0700
From:	Doug Anderson <dianders@...omium.org>
To:	Paul Bolle <pebolle@...cali.nl>
Cc:	Bill Richardson <wfrichar@...omium.org>,
	Simon Glass <sjg@...omium.org>,
	Lee Jones <lee.jones@...aro.org>,
	Stephen Warren <swarren@...dia.com>,
	Wolfram Sang <wsa@...-dreams.de>,
	Andrew Bresticker <abrestic@...omium.org>,
	Dylan Reid <dgreid@...omium.org>,
	Olof Johansson <olof@...om.net>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 5/7] mfd: cros_ec: Sync to the latest
 cros_ec_commands.h from EC sources

Paul,

On Wed, Jun 11, 2014 at 3:37 AM, Paul Bolle <pebolle@...cali.nl> wrote:
> On Tue, 2014-05-20 at 09:46 +0100, Lee Jones wrote:
>> On Wed, 30 Apr 2014, Doug Anderson wrote:
>> > From: Bill Richardson <wfrichar@...omium.org>
>> >
>> > This just updates include/linux/mfd/cros_ec_commands.h to match the
>> > latest EC version (which is the One True Source for such things).  See
>> > <https://chromium.googlesource.com/chromiumos/platform/ec>

I believe most of your questions are answered by checking out the git
tree referenced above.  ...but see below for details.  This header is
a common interface between the kernel and the EC.


>> > [dianders: took today's ToT version from the Chromium OS EC; deleted
>> > references to cros_ec_dev and cros_ec_lpc since those aren't upstream
>> > yet]
>> >
>> > Signed-off-by: Bill Richardson <wfrichar@...omium.org>
>> > Signed-off-by: Doug Anderson <dianders@...omium.org>
>> > Acked-by: Lee Jones <lee.jones@...aro.org>
>> > Reviewed-by: Simon Glass <sjg@...omium.org>
>> > Tested-by: Andrew Bresticker <abrestic@...omium.org>
>> > Tested-by: Stephen Warren <swarren@...dia.com>
>> > ---
>> > Changes in v3: None
>> > Changes in v2: None
>> >
>> >  drivers/mfd/cros_ec.c                |    2 +-
>> >  include/linux/mfd/cros_ec.h          |    4 +-
>> >  include/linux/mfd/cros_ec_commands.h | 1128 +++++++++++++++++++++++++++++++---
>> >  3 files changed, 1059 insertions(+), 75 deletions(-)
>>
>> Applied, thanks.
>
> This patch is included in linux-next since next-20140521. I'm not sure
> why I waited three weeks before sending this question...
>
>> > [...]
>> > diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
>> > index 86fd069..7853a64 100644
>> > --- a/include/linux/mfd/cros_ec_commands.h
>> > +++ b/include/linux/mfd/cros_ec_commands.h
>>> [...]
>> > @@ -1206,14 +1865,231 @@ struct ec_params_force_idle {
>> > [...]
>> > +/*
>> > + * Known param numbers are defined here. Ranges are reserved for board-specific
>> > + * params, which are handled by the particular implementations.
>> > + */
>> > +enum charge_state_params {
>> > +   CS_PARAM_CHG_VOLTAGE,         /* charger voltage limit */
>> > +   CS_PARAM_CHG_CURRENT,         /* charger current limit */
>> > +   CS_PARAM_CHG_INPUT_CURRENT,   /* charger input current limit */
>> > +   CS_PARAM_CHG_STATUS,          /* charger-specific status */
>> > +   CS_PARAM_CHG_OPTION,          /* charger-specific options */
>> > +   /* How many so far? */
>> > +   CS_NUM_BASE_PARAMS,
>> > +
>> > +   /* Range for CONFIG_CHARGER_PROFILE_OVERRIDE params */
>
> CONFIG_CHARGER_PROFILE_OVERRIDE doesn't match anything in linux-next. Is
> a Kconfig symbol CHARGER_PROFILE_OVERRIDE perhaps queued somewhere?

This is a config option on the ChromeOS EC
<https://chromium.googlesource.com/chromiumos/platform/ec>.  Doing a
grep there:

board/samus/board.h:#define CONFIG_CHARGER_PROFILE_OVERRIDE
common/charge_state_v2.c:#ifdef CONFIG_CHARGER_PROFILE_OVERRIDE
common/charge_state_v2.c:#ifdef CONFIG_CHARGER_PROFILE_OVERRIDE
common/charge_state_v2.c:#ifdef CONFIG_CHARGER_PROFILE_OVERRIDE
driver/battery/samus.c:#ifdef CONFIG_CHARGER_PROFILE_OVERRIDE
driver/battery/samus.c:#endif   /* CONFIG_CHARGER_PROFILE_OVERRIDE */
include/config.h:#undef CONFIG_CHARGER_PROFILE_OVERRIDE
include/ec_commands.h:  /* Range for CONFIG_CHARGER_PROFILE_OVERRIDE params */
test/test_config.h:#define CONFIG_CHARGER_PROFILE_OVERRIDE


>> > +   CS_PARAM_CUSTOM_PROFILE_MIN = 0x10000,
>> > +   CS_PARAM_CUSTOM_PROFILE_MAX = 0x1ffff,
>> > +
>
> I guess so, because these two constants aren't used anywhere.

A grep from the EC sources:

common/charge_state_v2.c:               if (in->get_param.param >=
CS_PARAM_CUSTOM_PROFILE_MIN &&
common/charge_state_v2.c:               if (in->set_param.param >=
CS_PARAM_CUSTOM_PROFILE_MIN &&
driver/battery/samus.c:#define PARAM_FASTCHARGE
(CS_PARAM_CUSTOM_PROFILE_MIN + 0)
include/ec_commands.h:  CS_PARAM_CUSTOM_PROFILE_MIN = 0x10000,
test/sbs_charging_v2.c: if (param == CS_PARAM_CUSTOM_PROFILE_MIN) {
test/sbs_charging_v2.c: if (param == CS_PARAM_CUSTOM_PROFILE_MIN) {
test/sbs_charging_v2.c: params.get_param.param = CS_PARAM_CUSTOM_PROFILE_MIN;
test/sbs_charging_v2.c: params.set_param.param = CS_PARAM_CUSTOM_PROFILE_MIN;
util/ectool.c:          printf("  0x%x - 0x%x\n", CS_PARAM_CUSTOM_PROFILE_MIN,

-Doug
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ