Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch replaces the comparison of variable say x to NULL with '!x'
signed-off-by: Janani Sankara Babu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Trival fix to spelling mistake in function name
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixed checkpatch errors, spaces before tabs.
Found using checkpatch.
Signed-off-by: Derek Robson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Trivial fix to spelling mistake in dev_dbg message
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch solves the code indentation issue inside the if block
Signed-off-by: Janani Sankara Babu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The fusb302 Type-C port-controller cannot control the current-limit
directly, so we need to exported the limit so that another driver
(e.g. the charger driver) can pick the limit up and configure the
system accordingly.
The power-supply subsys already provides infrastructure for this,
power-supply devices have the notion of being supplied by another
power-supply and have properties through which we can export the
current-limit.
Register a power_supply and export the current-limit through the
power_supply's current-max property.
Cc: "Yueyao (Nathan) Zhu" <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The fusb302 port-controller relies on an external device doing USB2
charger-type detection.
The Intel Whiskey Cove PMIC with which the fusb302 is combined on some
X86/ACPI platforms already has a charger-type detection driver which
uses extcon to communicate the detected charger-type.
Rather then inventing a new API for USB2 charger-type detection
specifically for use with the tcpm code, this commit simply re-uses the
existing extcon API and uses that do USB2 charger detection.
Note that the "fcs,extcon-name" property name is only for kernel internal
use by X86/ACPI platform code and as such is NOT documented in
the fusb302 devicetree bindings.
Cc: "Yueyao (Nathan) Zhu" <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The fusb302 is also used on x86 systems where the platform code sets
the irq in client->irq and there is no gpio named fcs,int_n.
Cc: "Yueyao (Nathan) Zhu" <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This is board specific info so it should come from board config, such
as devicetree.
I've chosen to prefix these with "fcs," treating them as fusb302 driver
specific for now. We may want to revisit this and replace these with
properties which are part of a (to be written) generic type-c controller
devicetree binding.
Since this commit adds new dt-properties it also adds devicetree-bindings
documentation (which so far was absent for the fusb302 driver).
Cc: Rob Herring <[email protected]>
Cc: Frank Rowand <[email protected]>
Cc: [email protected]
Cc: "Yueyao (Nathan) Zhu" <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Acked-by: Rob Herring <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Anything higher then 5V may damage hardware not capable of it, so
the only sane default here is 5V. If a board is able to handle a
higher voltage that should come from board specific data such as
device-tree and not be hard coded into the fusb302 code.
Cc: "Yueyao (Nathan) Zhu" <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
A Rp signalling the default current limit indicates that we're possibly
connected to an USB2 power-source. In some cases the type-c port-controller
may provide the capability to detect the current-limit in this case,
through e.g. BC1.2 detection.
This commit adds an optional get_current_limit tcpc_dev callback which
allows the port-controller to provide current-limit detection for when
the CC pin is pulled up with Rp.
Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch makes use of predefined identifier __func__ inorder to clear
the warning: Prefer using '"%s...", __func__' to using 'update_bmc_sta',
this function's name, in a string
Signed-off-by: Janani Sankara Babu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The patch removes "WARNING: Prefer using '"%s...", __func__'
to using 'xxxxxxxx', this function's name, in a string" warnings
reported by checkpatch.pl script.
Signed-off-by: Simo Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixed paranthesis alignment for compliance with checkpatch.
Signed-off-by: Edvard Holst <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Changing pr_err to dev_err in visor_check_channel. Added device
as an argument to visor_check_channel to pass into dev_err.
Signed-off-by: Sameer Wadgaonkar <[email protected]>
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Removing EXPORT_SYMBOL_GPU from visor_check_channel since it is
used only in visorbus.
Signed-off-by: Sameer Wadgaonkar <[email protected]>
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fix up the GUID definition to remove some checkpatch warnings as well as
using the whole width of the screen.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Every channel_type must have a valid GUID, checking for the name was just
redundant.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The size of the channel should be pulled from the channel header, not
from the message. All channels must be at least the size of the
channel_header.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Removes unnecessary return value in send_rcv_posts_if_needed(), since
NAPI polling functions do not return errors.
Signed-off-by: David Binder <[email protected]>
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The file visorchipset had a bunch of comments that were not using the full
screen before they wrapped, update the comments to wrap at 80 characters
instead.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Shorten the name of the function parser_init_byte_stream to just
parser_init_stream.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The parser functions were defined at the top of the file even though they
were not referenced until later in the file. This patch moves them closer
to where they are defined so they can be easily referenced.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Several variables were initialized when not needed. Remove the extraneous
initializations.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The function visorutil_spar_detect had an if clause that returns from the
function, no need to do the rest of the code in an else clause.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The data field was being defined as a character array and then casted into
a visor_controlvm_parameters_header structure. This patch converts it to
just point to the visor_controlvm_parameters_header structure. The data
following the header is still behind the header_info.
Reported-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Visorbus_configure had a block of "else if" clauses at the beginning of the
function. Simplify this to just being "if" clauses since each code block
ended with a goto.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The variable parm_addr will never be null, so no need to check for it.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The variable ctx was allocated with kzalloc, so all the data inside is
zero, no need to reset it to 0.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Currently setting it in the right location, so no longer not sure.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The functions to create the controlvm channel were disjointed and ignoring
information that was available. This patch consolidates it so it clearer
what is happening.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Checkpatch reports an error that no comment was next to the mutex lock.
Add an appropriate message for the lock.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The macro to convert to the driver object was giving a checkpatch warning
when it ateempted to check for a null driver. It would return NULL if it
found it, but only one location was checking to see if it was NULL.
Remove the check in the MACRO and do it prior to calling the macro if
required.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The dev_err was using the hardcoded function name, as reported by
checkpatch, it should be using __func__.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Several macros in visorchannel.c were doing complex arithmetic, converted
them to functions so that valid type checking could be done.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixed the following checkpatch warning:
visorchannel.c:443: CHECK: Alignment should match open parenthesis
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The function vmcall address needed to be cleaned up. The structure
vmcall_controlvm_addr was not needed so it was removed and was replaced
with vmcall_io_controlvm_addr_params since it needs to be allocated on the
heap for DMA access.
With the structure removed and the fields as local variables, it helped
clean up the formatting of the function.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixes miscellaneous formatting issues with several block comments
throughout visornic_main.c.
Signed-off-by: David Binder <[email protected]>
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Refactors existing static function comments to increase code readability.
Signed-off-by: David Binder <[email protected]>
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
visorbus_register_visor_driver.
The error return values for the drv->probe, drv->remove, drv->pause
and drv->resume checks should be -EINVAL instead of -ENODEV.
Reported-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Sameer Wadgaonkar <[email protected]>
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fixes a bug in the function parser_init_byte_stream()
by removing the call to parser_done from goto err_finish_ctx.
The function parser_done() decrements
chipset_dev->controlvm_payload_bytes_buffered which is not
incremented before this gets called.
Signed-off-by: Sameer Wadgaonkar <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The kernel already provides a min function, we should be using that
instead of creating our own MINNUM.
Reviewed-by: Sameer Wadgaonkar <[email protected]>
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Removed printk statements for debugging. The same information can be
acquired via ftrace, so these print statements are uneccessary.
Signed-off-by: Jonathan Whitaker <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The patch removes "WARNING: Prefer using '"%s...", __func__'
to using 'xxxxxxxx', this function's name, in a string" warnings
reported by checkpatch.pl script.
Signed-off-by: Simo Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This commit fixes alignment styling as reported by checkpatch.pl.
Signed-off-by: Jonathan Whitaker <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
casting to void pointer from any pointer type and vice-versa is done
implicitly and therefore casting is not needed in such a case.
Signed-off-by: Himanshu Jha <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
casting to void pointer from any pointer type and vice-versa is done
implicitly and therefore casting is not needed in such a case.
Signed-off-by: Himanshu Jha <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
casting to void pointer from any pointer type and vice-versa is done
implicitly and therefore casting is not needed in such a case.
Signed-off-by: Himanshu Jha <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
call to memset to assign 0 value immediately after allocating
memory with kzalloc is unnecesaary as kzalloc allocates the memory
filled with 0 value.
Signed-off-by: Himanshu Jha <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
calling memcpy immediately after memset with the same region of memory
makes memset redundant.
Signed-off-by: Himanshu Jha <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|