Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1332808 > unrolled thread

Re: [PATCH V3 1/6] stm class: Add ioctl get_options interface

Started byAlexander Shishkin <alexander.shishkin@linux.intel.com>
First post2016-02-12 16:30 +0100
Last post2016-02-12 19:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH V3 1/6] stm class: Add ioctl get_options interface Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-12 16:30 +0100
    Re: [PATCH V3 1/6] stm class: Add ioctl get_options interface Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-02-12 19:40 +0100

#1332808 — Re: [PATCH V3 1/6] stm class: Add ioctl get_options interface

FromAlexander Shishkin <alexander.shishkin@linux.intel.com>
Date2016-02-12 16:30 +0100
SubjectRe: [PATCH V3 1/6] stm class: Add ioctl get_options interface
Message-ID<r1nPs-mX-23@gated-at.bofh.it>
Chunyan Zhang <zhang.chunyan@linaro.org> writes:

> There is already an interface of set_options, but no get_options yet.
> Before setting any options, one would may want to see the current
> status of that option by means of get_options interface. This
> interface has been used in CoreSight STM driver.

I'm not sure I understand the reasoning behind this. If a userspace
program opens a communication channel and wants to configure certain
features on it, why does its choice depend on what has been configured
for this channel previously? It can be anything at all. Most likely,
it's either unconfigured or configured to its default values, but why
does this matter for a new writer?

Regards,
--
Alex

[toc] | [next] | [standalone]


#1333018

FromMathieu Poirier <mathieu.poirier@linaro.org>
Date2016-02-12 19:40 +0100
Message-ID<r1qNl-2ew-43@gated-at.bofh.it>
In reply to#1332808
On 12 February 2016 at 08:18, Alexander Shishkin
<alexander.shishkin@linux.intel.com> wrote:
> Chunyan Zhang <zhang.chunyan@linaro.org> writes:
>
>> There is already an interface of set_options, but no get_options yet.
>> Before setting any options, one would may want to see the current
>> status of that option by means of get_options interface. This
>> interface has been used in CoreSight STM driver.
>
> I'm not sure I understand the reasoning behind this. If a userspace
> program opens a communication channel and wants to configure certain
> features on it, why does its choice depend on what has been configured
> for this channel previously? It can be anything at all. Most likely,
> it's either unconfigured or configured to its default values, but why
> does this matter for a new writer?

A client may wish to change the settings (invariant/guaranteed) it has
on a specific channel - it may even want to so do multiple times.  The
idea behind introducing a get_options() was to probe the specific
settings of a channel before going a head with a new configuration.
In hindsight it may not be needed as a client should simply go ahead
and push down the configuration it wants.

>
> Regards,
> --
> Alex

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web