public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Baldyga <r.baldyga@samsung.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	rob@landley.net, myungjoo.ham@samsung.com, cw00.choi@samsung.com,
	dbaryshkov@gmail.com, dwmw2@infradead.org, balbi@ti.com,
	grant.likely@linaro.org, ldewangan@nvidia.com, kishon@ti.com,
	gg@slimlogic.co.uk, anton@enomsg.org, jonghwa3.lee@samsung.com,
	rongjun.ying@csr.com, linux@roeck-us.net,
	devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	patches@opensource.wolfsonmicro.com, linux-usb@vger.kernel.org,
	linux-omap@vger.kernel.org, aaro.koskinen@iki.fi,
	m.szyprowski@samsung.com, t.figa@samsung.com
Subject: Re: [PATCH v2 00/13] extcon: major rework
Date: Mon, 28 Apr 2014 11:34:02 +0200	[thread overview]
Message-ID: <535E208A.4050305@samsung.com> (raw)
In-Reply-To: <20140424195203.GG12809@kroah.com>

On 04/24/2014 09:52 PM, Greg KH wrote:
> On Mon, Apr 14, 2014 at 01:46:11PM +0200, Robert Baldyga wrote:
>> This patchset adds many improvements to extcon class driver and extcon
>> provider drivers. It changes extcon API to faster and safer by replaceing
>> function taking extcon and cable names with functions working with
>> structures representing this objects.
> 
> What is "faster" exactly?  How did you measure this?  What benchmarks
> can be run to test this claim?
> 

Most of new API functions are O(1), because they take as argument
pointer to struct extcon_cable, and operates on it. In contrast,
previous API functions needed to compare given cable name with name of
each cable specified in extcon controller. This solution was also prone
to errors - when you make typo in extcon name or cable name it will not
be detected at compilation time. The new API uses names only at
initialization, and after that each function takes pointer to struct
extcon_cable.

The old API is also fragile because defined list of cables could be
different in each extcon provider (the same cable could have different
name in each extcon provider), so using different extcon providers with
different drivers would need doing modifications in drivers.

Best regards
Robert Baldyga
Samsung R&D Institute Poland

      reply	other threads:[~2014-04-28  9:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 11:46 [PATCH v2 00/13] extcon: major rework Robert Baldyga
2014-04-14 11:46 ` [PATCH v2 01/13] Documentation: add extcon devicetree bindings Robert Baldyga
2014-04-22 19:51   ` Mark Brown
2014-04-25 13:19     ` Robert Baldyga
2014-04-25 14:11       ` Mark Brown
2014-04-14 11:46 ` [PATCH v2 02/13] Documentation: update charger-manager " Robert Baldyga
2014-04-14 11:46 ` [PATCH v2 03/13] extcon: extcon-class: remove extcon_set_cable_state() function Robert Baldyga
2014-04-14 11:46 ` [PATCH v2 04/13] extcon: extcon-class: match extcon device by devicetree node Robert Baldyga
2014-04-14 11:46 ` [PATCH v2 05/13] extcon: extcon-class: improve extcon client API Robert Baldyga
2014-04-19 10:52   ` Aaro Koskinen
2014-04-22  6:21     ` Robert Baldyga
2014-04-22 14:51       ` Felipe Balbi
2014-04-22 15:03       ` Aaro Koskinen
2014-04-23  7:33         ` Robert Baldyga
2014-04-14 11:46 ` [PATCH v2 06/13] extcon: extcon-class: remove unused functions Robert Baldyga
2014-04-14 11:46 ` [PATCH v2 07/13] extcon: extcon-class: improve get_cable_state_()/set_cable_state_() functions Robert Baldyga
2014-04-14 11:46 ` [PATCH v2 08/13] extcon: extcon-class: simplify extcon_updata_state() function Robert Baldyga
2014-04-14 11:46 ` [PATCH v2 09/13] extcon: extcon-class: move example to Documentation Robert Baldyga
2014-04-14 11:46 ` [PATCH v2 10/13] extcon: extcon-gpio: add devicetree support Robert Baldyga
2014-04-14 11:46 ` [PATCH v2 11/13] extcon: extcon-adc-jack: " Robert Baldyga
2014-04-14 11:46 ` [PATCH v2 12/13] extcon: extcon-max8997: check if pdata exists Robert Baldyga
2014-04-14 11:46 ` [PATCH v2 13/13] extcon: extcon-max77693: " Robert Baldyga
2014-04-23 20:00 ` [PATCH v2 00/13] extcon: major rework Aaro Koskinen
2014-04-24 19:52 ` Greg KH
2014-04-28  9:34   ` Robert Baldyga [this message]

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=535E208A.4050305@samsung.com \
    --to=r.baldyga@samsung.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=anton@enomsg.org \
    --cc=balbi@ti.com \
    --cc=cw00.choi@samsung.com \
    --cc=dbaryshkov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=galak@codeaurora.org \
    --cc=gg@slimlogic.co.uk \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jonghwa3.lee@samsung.com \
    --cc=kishon@ti.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=m.szyprowski@samsung.com \
    --cc=mark.rutland@arm.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=pawel.moll@arm.com \
    --cc=rob@landley.net \
    --cc=robh+dt@kernel.org \
    --cc=rongjun.ying@csr.com \
    --cc=t.figa@samsung.com \
    /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