- 14 May, 2015 1 commit
-
-
Rui Miguel Silva authored
Add checks for options that shall be enabled in the kernel config and for options that shall be disable. To add options to list append them to CONFIG_OPTIONS_ENABLE or CONFIG_OPTIONS_DISABLE respectively. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
- 12 May, 2015 8 commits
-
-
Alex Elder authored
There's no reason we can't support loopback pings or transfers initiated by the module. Allow it. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Alex Elder authored
Add some symbols to indicate what kind of "function" the loopback thread is supposed to be performing--the type of traffic it generates over its connection. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Alex Elder authored
Use a symbolic constant to define the maximum time (number of milliseconds) to delay between initiated operations. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Alex Elder authored
Fix a comment that incorrectly says the delay between messages is limited to 1024 msec; it actually must be <= 1000 msec. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Alex Elder authored
If an error occurs starting up the loopback thread, the error code is not extracted properly. Fix that. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Alex Elder authored
In gb_loopback_check_attr(), the value of gb->type is checked for validity. The only valid values are 0, 1, and 2. But the check allows the value 3. Fix that. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Greg Kroah-Hartman authored
sparse is rightfully complaining about a lack of converting when accessing or assigning to little endian fields. Fix them all up to work properly. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
-
Greg Kroah-Hartman authored
This makes some functions and structures static, as warned by sparse, as they don't need to be global. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
-
- 11 May, 2015 5 commits
-
-
Rui Miguel Silva authored
remane protocol define from GREYBUS_PROTOCOL_LED to GREYBUS_PROTOCOL_LIGHTS to be coherent with the specification. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
We already have code to parse Endo ID, lets use it to create modules at run time instead of creating them from a static array. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
Endo is described by a 16 bit value. Which represents the properties of modules, interface and ribs on front and back of endo. This 16 bit value can be used to find all possible pairs of modules and interfaces and creating modules based on that. This patch provides helpers to parse 16 bit Endo ID. (Based on original code written by Alex Elder.) Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Greg Kroah-Hartman authored
In commit 1efb53a2 ("ASoC: simple-card: Remove support for setting differing DAI formats"), the .fmt field was removed from struct asoc_simple_dai. Fix this build breakage by not trying to set it. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Acked-by: John Stultz <john.stultz@linaro.org>
-
Greg Kroah-Hartman authored
sizeof wants %zu when on a 64bit build, so change the dev_err() call to remove a build warning in the audio.c file. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Acked-by: John Stultz <john.stultz@linaro.org>
-
- 08 May, 2015 2 commits
-
-
Bryan O'Donoghue authored
Introduce INSTALL_MOD_PATH to allow for building and installing of the greybus modules from a different location. This lets you build the greybus modules on a PC and then install the modules to an SD card in the appropriate location relative to the SD such as /media/sdcard/lib/modules/version and subsequent running of depmod in the same location. If INSTALL_MOD_PATH isn't specified the default behaviour of installing and depmoding to /lib/modules/version is maintained. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
John Stultz authored
So here's the current greybus audio driver, which I wanted to send out for more serious review and consideration for merging. I've tried to integrate much of the feedback from the last round and most of the hotplug issues that I've found have been resolved. I've tested this via gbsim, and the Android ARA HAL layer seems to work with it. Mark has also successfully played audio with this driver, adding a few hacks to get the codec's i2c connection to probe. Current issues: * Hotplug problem - When gbsim is killed, or the module removed, the greybus driver gets stuck since the android mediaserver process is holding the audio device open. Killing the mediaserver allows things to clean up and allows greybus to accept new gbsim connections. I have a workaround patch to the soc-core.c logic which converts the snd_card_free() call to snd_card_free_when_closed() which allows the greybus connection cleanup to finish. Remaining todos: * Probably need to break apart the mgmt_setup function to integrate better with the constraint logic. I took a really basic stab at this, but more is probably needed. * Figure out how to properly find and tie in the codec's I2C bus-id to the driver. This code requires that the kernel support the following config options, which I've enabled in a separate kernel patch: CONFIG_SND_SIMPLE_CARD CONFIG_SND_SOC_SPDIF CONFIG_SND_SOC_RT5645 I really can't calim to be the sole author of this, since many many fixes and tweaks that have been folded in have come from Mark Greer. His analsysis and debugging is really what has made this dummy-framework driver evolve into an actual audio driver. So much credit and thanks to Mark! Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
- 07 May, 2015 3 commits
-
-
Alex Elder authored
All protocols use the same value to distinguish between request and response message types. This is a requirement. Use GB_MESSAGE_TYPE_RESPONSE rather than GB_OPERATION_TYPE_RESPONSE for the name of the flag used to distiguish between request and response messages. Get rid of the redundant response flag definitions that are associated with specific protocols. Describe the symbolic values as "operation types" rather than "message types" where they are defined. The message type for a request is the same as the operation type; the message type for a response is the operation type OR'd with GB_MESSAGE_TYPE_RESPONSE. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Alex Elder authored
Conditionally define a new symbol DRIVER_OWNS_PSY_STRUCT, which is set in "kernel_ver.h" based on on the kernel version. Use it to distinguish code used for kernels that differ in whether a power supply structure is owned by the driver, or by the power supply core. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Alex Elder authored
When a battery connection is initialized, a gb_battery structure for it is allocated in gb_battery_connection_init(). Currently that function ends by calling init_and_register(); in the event an error occurs, init_and_register() is responsible for freeing the allocated gb_battery structure. Make the code a bit better balanced by having the function that allocates the structure be responsible for freeing it in case of error. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
- 05 May, 2015 7 commits
-
-
Rob Herring authored
Both ES1 and ES2 drivers cannot be loaded due to a driver name conflict. Give ES2 driver the correct name. Signed-off-by: Rob Herring <rob.herring@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Greg Kroah-Hartman authored
No need to go past 80 characters for the define_get_version macro, so fix up the indentation to not do so. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
-
Greg Kroah-Hartman authored
Remove the trailing ';' character from the gb_protocol_driver() macro as it's not needed and is bad coding style. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
-
Greg Kroah-Hartman authored
checkpatch reminds us that a blank line should go after a variable definition, so fix it up here. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
-
Greg Kroah-Hartman authored
You should always put a space after a ',', so do it for the KERNEL_VERSION() macro as well. This makes checkpatch.pl happy also. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
-
Greg Kroah-Hartman authored
When cutting and pasting some of the ATTR macros into kernel_ver.h, I dropped the tabs. Fix this up and make checkpatch.pl happy. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
-
Greg Kroah-Hartman authored
The 4.1-rc1 kernel changed the power supply apis such that the structures are now owned by the power supply core, and not the individual drivers. This broke the greybus battery driver, so update it to support both the old and the new apis. The API changes were such that I can't "hide" them in kernel_ver.h, but rather the driver itself needs to have ugly #ifdefs in it. I tried to keep it to a minimum, making a sub-function for initializing the power supply device that is implemented differently for different kernel versions. When this is submitted upstream, or if we ever move our AP development to 4.1 or greater, the support for older kernels can be removed. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
-
- 01 May, 2015 6 commits
-
-
Viresh Kumar authored
Note that this also makes sure the id-field is naturally aligned in case we ever were to remove the __packed attribute. Reviewed-by: Alex Elder <elder@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
Explicitly add pad-bytes to manifest descriptors to match their layout in greybus specification. Reviewed-by: Alex Elder <elder@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
We carry this information as part of bundle descriptor now and this can be removed. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
It is not required anymore. Drop it. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
These should come from control protocol instead. For now, initialize this statically with a FIXME to not forget it later. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Alex Elder authored
The kernfs code guarantees we'll get a NUL-terminated buffer. Use kstrdup() rather than kzalloc() + memcpy() in state_store() making it slightly clearer what we're doing. This has the added benefit of guaranteeing that the stored string has no NUL character inside it. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
- 29 Apr, 2015 5 commits
-
-
Viresh Kumar authored
A descriptor passed to AP can be bigger than what AP expects, if manifest's minor version is higher with same major number as the AP. As it can have some extra data in descriptor. But, if AP and manifest versions are identical, or if the AP's minor version is greater than the manifest version, we should at least warn (if not fail). Doing this would require some changes to record the manifest version somewhere reachable by identify_descriptor(). For now, just warn if descriptor is bigger than expected. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
String descriptors are padded towards the end to align them to 4 byte boundaries. Take that into account while calculating expected size. Reviewed-by: Alex Elder <elder@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
These structures are already marked as __packed, as these are enclosed within: #pragma pack(push, 1) #pragma pack(pop) Lets mark them __packed explicitly. Reviewed-by: Alex Elder <elder@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
There can be three Endo types: mini, medium and large. And that's what Endo 'type' should refer to. But we have named the 16 bit number that uniquely represents a valid endo, as its type. 'id' seems to be a more suitable name to that instead of 'type'. Lets rename it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
0x0555 isn't a valid endo id, use a real one. 0x4755 should be the Endo id for the (medium) Spiral 2 prototype. Lets use that. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
- 17 Apr, 2015 2 commits
-
-
Greg Kroah-Hartman authored
These are all GPLv2-only kernel modules, so properly set the correct MODULE_LICENSE string to make static checkers happy. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Greg Kroah-Hartman authored
A bundle has a state file, that is managed by the endo userspace process. This file can be written to and any process that is polling on the file will be woken up and can read the new value. It's a "cheap" IPC for programs that are not allowed to do anything other than read/write to kernel sysfs files. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
- 16 Apr, 2015 1 commit
-
-
Johan Hovold authored
The code uses 64-bit divisions, which should be avoided, and also prevents the module from loading on 32-bit systems: gb_loopback: Unknown symbol __aeabi_uldivmod (err 0) Fix by using the kernel's 64-bit by 32-bit division implementation do_div. Compile tested only. I did not look very closely at the code itself. Perhaps this could be worked around in some other way, but this silences the linker warning and allows the module to be loaded. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-