- 11 6月, 2015 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
The firmware is having a hard time with 4k buffers and memory allocation, so decrease the size on the host side to 2k. Also move away from using PAGE_SIZE to denote 4k as that's not the case on all architectures, and someone, someday, might get a rude surprise. Reviewed-by: NAlex Elder <elder@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
- 10 6月, 2015 3 次提交
-
-
由 Phong Tran 提交于
The unregister_chrdev_region() does twice here. The chrdev region was unregistered inside tty_unregister_driver(). Signed-off-by: NPhong Tran <tranmanphong@gmail.com> Reviewed-by: NAlex Elder <elder@linaro.org> Reviewed-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Phong Tran 提交于
There is a sparse warning. The endo id map is also used in endo.c. Should define in endo.h Signed-off-by: NPhong Tran <tranmanphong@gmail.com> Reviewed-by: NAlex Elder <elder@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Viresh Kumar 提交于
Normally, its a good practice to free resources in the reverse order in which they are allocated, so that all the dependencies can be sorted out properly. This is true while creating/destroying devices as well. For example consider this scenario (I faced a crash with control protocol due to this). For a new module, we will first create a bundle+connection for the control cport and then create other bundles/connections after parsing manifest. And while destroying interface on module hot unplug, we are removing the devices in the order they are added. And so the bundle/connection for the control cport are destroyed first. But, control cport was still required while destroying other bundles/connections. To solve this problem, lets destroy the resources in the reverse order in which they are added. Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Reviewed-by: NAlex Elder <elder@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
- 09 6月, 2015 7 次提交
-
-
由 Alex Elder 提交于
Provide a little more information in two pr_err() calls. Also enclose a reported condition in parentheses, to match the style used everywhere else in the file. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Alex Elder 提交于
Rename greybus_deregister() to be greybus_deregister_driver(), so its name mirrors the greybus_register_driver() function it matches. Define greybus_deregister() to be a trivial macro. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Alex Elder 提交于
In gb_uart_request_recv(), the receive data size is in little-endian format. Do the proper byte swapping of that value before using it. Found by "make check". Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Alex Elder 提交于
Give gb_connection_hd_find() static scope; it's never used outside "connection.c". Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Alex Elder 提交于
The SVC protocol driver should have been defined as a basic Greybus protocol driver, not a GP Bridge protocol driver. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Viresh Kumar 提交于
Prefix module-id with endo-id to uniquely identify it for the entire kernel. Reviewed-by: NAlex Elder <elder@linaro.org> Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Viresh Kumar 提交于
Currently we name the endo device as "endo". And it shows up with the same name in sysfs directory: /sys/bus/greybus/devices/. But each device in kernel should be represented by a unique id in kernel, and "endo" isn't unique. Lets generate unique ids for endo devices. The ida mechanism for allocating ids may be overkill but it works. Reviewed-by: NAlex Elder <elder@linaro.org> Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
- 04 6月, 2015 12 次提交
-
-
由 Viresh Kumar 提交于
This isn't unique just for the bundle but the complete interface. Its wrong to call it bundle_cport_id. Lets name it intf_cport_id to make things clear. Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Viresh Kumar 提交于
'buffer' isn't used in this function, remove it. Reviewed-by: NJohan Hovold <johan@hovoldconsulting.com> Reviewed-by: NAlex Elder <elder@linaro.org> Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Bryan O'Donoghue 提交于
Use defines for the data format command. Tidy up naming of gb_tty variables. Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Bryan O'Donoghue 提交于
gb_uart_request_recv job in life is to process unsolicited greybus mesages from the UART. Hook the incoming UART data and pass to the TTY layer. Line-state changes still TBD. Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Bryan O'Donoghue 提交于
Make kmalloc for the send buffer a one time alloc based on the MTU for a given greybus link. The write_room for an gb_operation_sync then will be the size of the buffer we use for a single operation. Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Bryan O'Donoghue 提交于
gb_operation_sync returns 0 on success but the calling function expects the number of bytes written on success or a negative errno Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Bryan O'Donoghue 提交于
For each new UART connection we need to do a tty_port_init else we'll crash when trying to access the tty mutex later on. Base the TTY major/minor numbers on non-zero values. Supply an empty operations structure for the newly regitered port. Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Bryan O'Donoghue 提交于
Arbitrary number 255 is both not aligned and probably too big. Move the UART count down to 16 which is still large but, more realistic. 8 may be too few for future testing setups, 16 should accomodate any. Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Bryan O'Donoghue 提交于
Update tabs and naming of structures to match the naming used in the greybus specification more closely. Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Bryan O'Donoghue 提交于
gbsim depends on the structures and defines in greybus_protocols.h generally in order to simulate firmware. Move UART defines into this header to facilitate. Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Phong Tran 提交于
If alloc minor is error, gb_tty should free. Signed-off-by: NPhong Tran <tranmanphong@gmail.com> Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Viresh Kumar 提交于
Because of the missing '\n', this is how the output of reading endo sysfs files looks: root# cat /sys/bus/greybus/devices/endo/id 0x4755root# Fix it by including \n to the end of the printed string. Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Reviewed-by: NAlex Elder <elder@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
- 29 5月, 2015 13 次提交
-
-
由 Johan Hovold 提交于
Add Greybus GPIO IRQ-type defines rather than rely on the current Linux implementation. Signed-off-by: NJohan Hovold <johan@hovoldconsulting.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Johan Hovold 提交于
Remove unused debounce define from protocol header. Signed-off-by: NJohan Hovold <johan@hovoldconsulting.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Alex Elder 提交于
With the Endo "id" attribute in place, there's no need to encode the ID of an Endo in its sysfs path. So get rid of it. Signed-off-by: NAlex Elder <elder@linaro.org> Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Alex Elder 提交于
This commit: 7e761e2 endo: rework some attributes added a new "endo_id" attribute, located under a new "Endo" directory in sysfs. The resulting path looks like: Documentation/sysfs/endo-TYPE/Endo/endo_id There's no need to have a separate "Endo" subdirectory to contain Endo-specific attributes. That commit also added "svc_" to some other paths related to the SVC, like: Documentation/sysfs/endo-TYPE/SVC/svc_version The additional "svc_" is redundant. This patch retouches those paths a bit, mainly to remove some redundancy. It also makes the pathname components all lower case. As a result, the above two paths now look like: Documentation/sysfs/endo-TYPE/id Documentation/sysfs/endo-TYPE/svc/version All other Endo sysfs files are updated similarly. Signed-off-by: NAlex Elder <elder@linaro.org> Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Alex Elder 提交于
Impose a few editorial conventions on the Greybus-related sysfs files under "Documentation". - Capitalize "Endo" (except in path names) - Capitalize "ID" (except in path names) - Use "..." to indicate unspecified path components (because ".." means something else). - Add the "0x" prior to the "XXXX" representing the Endo ID. Signed-off-by: NAlex Elder <elder@linaro.org> Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Alex Elder 提交于
Update the files documenting Greybus-related sysfs files under Documentation/ to reflect the addition of the two recently-added Endo attributes. Signed-off-by: NAlex Elder <elder@linaro.org> Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Phong Tran 提交于
This is not a kernel module. It should not use the module license macro. Signed-off-by: NPhong Tran <tranmanphong@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Phong Tran 提交于
This macro should be DATA not MGMT. Signed-off-by: NPhong Tran <tranmanphong@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Alex Elder 提交于
I neglected to update the "#ifndef/#define" when I renamed "greybus_protocols.h". Fix that. Signed-off-by: NAlex Elder <elder@linaro.org> Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Johan Hovold 提交于
Update the remaining operation types now that the ack operation is gone to avoid leaving a hole in the type definitions. Signed-off-by: NJohan Hovold <johan@hovoldconsulting.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Greg Kroah-Hartman 提交于
-
由 Phong Tran 提交于
Change to gb_gpbridge_protocol_driver for making the consitent with other drivers. Signed-off-by: NPhong Tran <tranmanphong@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Phong Tran 提交于
data of hotplug request should exchange to native CPU format before assignment. Signed-off-by: NPhong Tran <tranmanphong@gmail.com> Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
- 27 5月, 2015 4 次提交
-
-
由 Johan Hovold 提交于
The current interrupt implementation uses the simple irq-flow handler, which means that the interrupt subsystem makes no irq-chip callbacks when handling an interrupt. Specifically, no end-of-interrupt message is sent when the threaded handler has run. This means that we may currently re-enable an interrupt before it has been serviced (i.e. the irq-event operation may complete before the threaded handler has run). The simple flow handler also silently drops a second interrupt arriving while a handler is running. This means that we may lose a second edge interrupt with the current firmware. Switch to a new one-shot interrupt protocol, where the primary handler (firmware) always masks and acks an interrupt before sending an event to the AP. The AP is responsible for unmasking the interrupt when it has been handled. By having the firmware ack an edge interrupt before sending the event, a second edge interrupt will no longer get lost. This one-shot protocol can be implemented in the kernel by using the level irq-flow handler, one-shot interrupts with threaded handlers and bus-lock synchronisation for slow buses. Note that the same flow handler is used for both edge and level interrupts. Signed-off-by: NJohan Hovold <johan@hovoldconsulting.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Johan Hovold 提交于
The irq-chip callbacks are made in atomic context where we must not do any synchronous greybus operations. Fix the current gpio-interrupt implementation by using the bus-lock functionality provided by the irq subsystem. Signed-off-by: NJohan Hovold <johan@hovoldconsulting.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Johan Hovold 提交于
Rename irq mask and unmask functions to match the callback names. Signed-off-by: NJohan Hovold <johan@hovoldconsulting.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-
由 Johan Hovold 提交于
Use irq_find_mapping directly rather than go through the legacy gpio interface. Signed-off-by: NJohan Hovold <johan@hovoldconsulting.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
-