mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] power: supply: sysfs: parse string as enum when writing property
Date: Tue, 11 Apr 2017 11:38:40 -0500	[thread overview]
Message-ID: <f695eb57-d6b9-a1a6-a47f-347a5663478a@lechnology.com> (raw)
In-Reply-To: <20170411161222.t23gsn4pvxofhnrh@earth>

On 04/11/2017 11:12 AM, Sebastian Reichel wrote:
> Hi,
>
> On Mon, Apr 03, 2017 at 02:52:57PM -0500, David Lechner wrote:
>> This fixes the TODO to parse strings and convert them to enum values
>> when writing to a power_supply class property sysfs attribute.
>>
>> There is at least one driver that has a writable enum property that
>> previously could only be written as an integer, so a fallback to writing
>> enums as integers instead of strings is provided so we don't break existing
>> userspace programs.
>>
>> Signed-off-by: David Lechner <david@lechnology.com>
>>
>> ---
>>  drivers/power/supply/power_supply_sysfs.c | 124 ++++++++++++++++++++----------
>>  1 file changed, 85 insertions(+), 39 deletions(-)
>
> drivers/power/supply/power_supply_sysfs.c: In function ‘power_supply_store_property’:
> drivers/power/supply/power_supply_sysfs.c:138:9: error: implicit declaration of function ‘sysfs_match_string’ [-Werror=implicit-function-declaration]

This is something I found in linux-next. I did not realize it was new. 
It looks like it is part of a patch series for USB-C connectors.[1]

It greatly simplifies things, so I think we should wait for that patch 
to land.


[1]: https://patchwork.kernel.org/patch/9636485/

  reply	other threads:[~2017-04-11 16:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03 19:52 David Lechner
2017-04-11 16:12 ` Sebastian Reichel
2017-04-11 16:38   ` David Lechner [this message]
2017-04-12 14:41     ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f695eb57-d6b9-a1a6-a47f-347a5663478a@lechnology.com \
    --to=david@lechnology.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®