History log of /linux-master/drivers/staging/greybus/audio_manager_sysfs.c
Revision Date Author Comments
# 9a928654 12-Feb-2021 Manikantan Ravichandran <ravman1991@gmail.com>

staging: greybus: minor code style fix

checkpatch warning fix for string split across lines

Signed-off-by: Manikantan Ravichandran <ravman1991@gmail.com>
Link: https://lore.kernel.org/r/20210212225035.GA16260@whach
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8478c35a 25-Nov-2018 Cristian Sicilia <sicilia.cristian@gmail.com>

staging: greybus: Parenthesis alignment

Some parameters are aligned with parentheses.
Some parentheses was opened at end of line.

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 863dbc52 07-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: greybus: Remove redundant license text

Now that the SPDX tag is in all greybus files, that identifies the
license in a specific and legally-defined manner. So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Acked-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Acked-by: David Lin <dtwlin@gmail.com>
Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Acked-by: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# eb50fd3a 07-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: greybus: add SPDX identifiers to all greybus driver files

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the drivers/staging/greybus files files with the correct SPDX
license identifier based on the license text in the file itself. The
SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
Cc: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Acked-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Acked-by: David Lin <dtwlin@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 49b9137a 17-Oct-2016 Pankaj Bharadiya <pankaj.bharadiya@gmail.com>

staging: greybus: audio: remove redundant slot field

gb_audio_manager_module_descriptor's intf_id field maintains the
information about the interface on which module is connected hence
having an extra slot field is redundant.

Thus remove the slot field and its associated code.

Signed-off-by: Pankaj Bharadiya <pankaj.bharadiya@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f9a21a3f 14-Oct-2016 Elise Lennion <elise.lennion@gmail.com>

staging: greybus: audio_manager_sysfs: Replace sscanf with kstrto* to single variable conversion.

Fix checkpatch warning:

WARNING: Prefer kstrto<type> to single variable sscanf

kstrto* is designed to convert string to numerical value and makes
it easier to understand what the code does.

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Reviewed-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d0af1bd5 16-Oct-2016 Pankaj Bharadiya <pankaj.bharadiya@gmail.com>

staging: greybus: audio: Rename cport with intf_id

gb_audio_manager_module_descriptor's cport field is actually used to
manage and pass interface id to user space.

Thus rename gb_audio_manager_module_descriptor's 'cport' field and
few other things to avoid confusion.

Signed-off-by: Pankaj Bharadiya <pankaj.bharadiya@gmail.com>
Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2072763c 11-Oct-2016 Chase Metzger <chasemetzger15@gmail.com>

drivers: staging: greybus: audio_manager_sysfs.c: Fixed CHECK for brace issue

Added braces to else and else if statements where checkpatch complained.

Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a9234bfd 30-Mar-2016 Vaibhav Agarwal <vaibhav.agarwal@linaro.org>

greybus: audio_manager: Split device type into i/p & o/p devices

Currently, single field is used to report device type say SPK,
MIC, HS, HP, etc. However above HAL expects separate fields for
input & ouput device types.

Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>


# 8db00736 13-Jan-2016 Svetlin Ankov <ankov_svetlin@projectara.com>

greybus: audio: Add Audio Manager

This is a simple module that keeps a list of connected GB audio
modules.

Whenever a device is attached, an appropriate uevent is sent to
userspace:

UDEV [4941.803215] add /kernel/gb_audio_manager/0 (gb_audio_manager)
ACTION=add
CPORT=99
DEVICES=0x10
DEVPATH=/kernel/gb_audio_manager/0
NAME=naim
PID=64
SEQNUM=1828
SLOT=2
SUBSYSTEM=gb_audio_manager
USEC_INITIALIZED=802416
VID=128

And whenever removed:

UDEV [4941.836588] remove /kernel/gb_audio_manager/0 (gb_audio_manager)
ACTION=remove
DEVPATH=/kernel/gb_audio_manager/0
SEQNUM=1833
SUBSYSTEM=gb_audio_manager
USEC_INITIALIZED=835681

The API consists of functions for adding, removing and inspecting
added device module descriptions (struct gb_audio_module):

int gb_audio_manager_add(struct gb_audio_module_descriptor *desc);
int gb_audio_manager_remove(int id);
int gb_audio_manager_remove_all(void);
struct gb_audio_module* gb_audio_manager_get_module(int id);
void gb_audio_manager_put_module(struct gb_audio_module *module);
int gb_audio_manager_dump_module(int id);
void gb_audio_manager_dump_all(void);

Devices can be inspected through sysfs in /sys/kernel/gb_audio_manager/{id}/*

If GB_AUDIO_MANAGER_SYSFS is exported as 'true', managing devices can be done
via the SYSFS as well. For instance:

echo name=naim slot=2 vid=128 pid=64 cport=99 devices=0x10 > /sys/kernel/gb_audio_manager/add
echo all > /sys/kernel/gb_audio_manager/dump
echo 2 > /sys/kernel/gb_audio_manager/dump
echo 2 > /sys/kernel/gb_audio_manager/remove

Signed-off-by: Svetlin Ankov <ankov_svetlin@projectara.com>
Signed-off-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>