Age | Commit message (Collapse) | Author | Files | Lines |
|
Replace the GPL (or later) header with the SPDX identifier
for GPL-2.0+.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Save one call and make code prettier by checking the i2c functionality
in the beginning of at24_probe(), saving the relevant values and
reusing them later.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Align the broken line with the opening parenthesis to stay consistent
with the rest of the driver code.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove the newline between the nvmem registration and its return value
check. This is consistent with the rest of the driver code.
Add a missing newline between two pdata checks to stay consistent with
all the others.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The code in at24_probe() is pretty mangled. It can be cleaned up a bit
by doing things one by one.
Let's group the code by logic: parse and verify pdata, initialize the
regmap, allocate and fill the fields of at24_data, allocate dummy i2c
devices, initialize pm & register with nvmem.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Not all fields from at24_platform_data are needed in at24_data. Let's
keep just the ones we need and not carry the whole platform_data
structure all the time.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This driver can receive its device data from different sources
depending on the system. Move the entire code processing platform data,
device tree and acpi into a separate function.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use the new probe() style for i2c drivers.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use a helper function for accessing the device struct of the base
i2c client. This routine is named in a way that reflects its purpose
unlike the previously hand-coded dereferencing.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use a helper variable for the size we want to allocate with
devm_kzalloc() and save an ugly line break.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We use the &client->dev construct all over in at24_probe(). Use
a helper variable which is more readable and allows to avoid a couple
unnecessary line breaks.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Reflect the purpose of this variable: it contains platform data so name
it such.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
As preparation for at24_probe() refactoring: rename at24_get_pdata()
to at24_properties_to_pdata(). We're doing it because we'll move the
pdata parsing code into a separate function which will be called
at24_get_pdata(). Current routine with that name actually parses
the device properties so change its name to reflect its purpose.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We support certain models the size of which is not a power of 2. This
is not a reason to emit a warning.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
When zeroing structs, use "{ }" everywhere.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We can reuse ret instead of defining a loop-local status variable.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We can reuse ret instead of defining a loop-local status variable.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
These are just two left-overs from times when this driver was bigger.
They are not really useful anymore. Remove them.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Arrange declarations of local variables by line length as visually
it's easier to read.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This structure only needs to exist during the call to nvmem_register().
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We use our own mutex for locking. Disable the regmap-specific locking.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Resolved checkpatch warning "sizeof t should be sizeof(t)"
issue found by checkpatch.
Signed-off-by: Devang Panchal <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next
Chanwoo writes:
Update extcon for 4.17
Detailed description for this pull request:
1. Add exported extcon function in order to support OF graph binding
- The extcon consumer driver used the "extcon = <&extcon's phandle"
property in device-tree in order to bind between extcon provider
and consumer driver. But, OF graph method is better than 'extcon' property.
So, extcon subsystem adds the following function to support OF graph binding.
: extcon_find_edev_by_node(struct device_node *node)
- Create the immutable branch ("ib-extcon-drm-dt-v4.17") for both drm-misc
and device-tree subsystem. This immutable branch contains the use-case of
OF graph binding for EXTCON_HDMI connector between MHL device driver
and extcon provider driver.
2. Fix minor issues of extcon device drivers
- Remove platform_data and covert to fully use GPIO descriptor for extcon-gpio.c
- Remove workaround code for id pin direction from extcon-inte-int3496.c
because GPIO ACPI library does support it with generic way.
- Set direction and drv flags for V5 boost GPIO because of fixing
the firmware bug.
|
|
|
|
Since we are not getting the GPIO from any platform data and global
GPIO numberspace, we simply get the named "extcon" GPIO directly from
the device. Cut away "active low" since GPIO descriptors already know
if the line is active high or low. Simplify a bit with a
struct device *dev helper variable in probe() and cut the complex
init() function.
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
|
|
This moves the platform data settings from the platform data
struct and into the state container, saving some unnecessary
references and simplifying things a bit.
Signed-off-by: Linus Walleij <[email protected]>
[cw00.choi: Add FIXME comment of extcon_id]
Signed-off-by: Chanwoo Choi <[email protected]>
|
|
Nothing in the entire kernel #includes <linux/extcon/extcon-gpio.h>
so move the platform data declaration inside of the driver.
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
|
|
The commit
70216fd937fe ("extcon: int3496: Set the id pin to direction-input if necessary")
introduced a workaround for incorrect IoRestriction mode in ACPI table.
Now, when GPIO ACPI library does it in generic way, see the commit
1b2ca32ab0b8 ("gpiolib: acpi: Introduce NO_RESTRICTION quirk")
for the details, just set an appropriate quirk flag instead.
Reviewed-by: Hans de Goede <[email protected]>
Tested-by: Hans de Goede <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
|
|
Sometimes (firmware bug?) the V5 boost GPIO is not configured as output
by the BIOS, leading to the 5V boost convertor being permanently on,
Explicitly set the direction and drv flags rather then inheriting them
from the firmware to fix this.
Fixes: 585cb239f4de ("extcon: intel-cht-wc: Disable external 5v boost ...")
Cc: [email protected]
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into char-misc-next
Mike writes:
thunderbolt: Changes for v4.17 merge window
New features:
- Intel Titan Ridge Thunderbolt 3 controller support
- Preboot ACL supported, allowing more secure way to boot from
Thunderbolt devices
- New "USB only" security level
In addition there are a couple of fixes for increasing timeout when
authenticating the ICM firmware and reading root switch config space.
Preventing a crash on certain Lenovo systems where ICM firmware for some
reason is not always properly starting up.
|
|
To date this driver has relied on prevous state from out of tree hacks
and vendor u-boot trees in order to have the host be able to access
data over the LPC bus.
Now we explicitly enable the AHB to LPC bridge and FWH cycles from when
the user first configures the address to map. We chose to do this then
as before that time there is no way for the kernel to know where it is
safe to point the LPC window.
Tested-by: Lei YU <[email protected]>
Reviewed-by: Andrew Jeffery <[email protected]>
Signed-off-by: Joel Stanley <[email protected]>
Reviewed-by: Cyril Bur <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The LPC device needs to ensure it's clock is enabled before it can do
anything.
In the past the clock was enabled and left running by u-boot, however
Linux now has an upstream clock driver that disables unused clocks.
Tested-by: Lei YU <[email protected]>
Reviewed-by: Andrew Jeffery <[email protected]>
Signed-off-by: Joel Stanley <[email protected]>
Reviewed-by: Cyril Bur <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The LPC Host Interface Controller is part of a BMC SoC that is used for
communication with the host.
Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Joel Stanley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
if device_register() returned an error! Always use put_device()
to give up the reference initialized.
Signed-off-by: Arvind Yadav <[email protected]>
Reviewed-by: Uwe Kleine-König <[email protected]>
Acked-by: Andrew Donnellan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Never directly free @dev after calling device_register(),
even if it returned an error! Always use put_device() to
give up the reference initialized.
Release allocated memory for vop device in vop_release_dev().
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
When I tried to use devm_ioremap function and review related
code, I found devm_ioremap_* almost have the similar realize
with each other, which can be combined.
In the former version, I have tried to kill ioremap_cache to
reduce the size of devres, which can not work for ioremap is
not the same as ioremap_nocache in some ARCHs likes ia64.
Therefore, as the suggestion of Christophe, I introduce a help
function __devm_ioremap, let devm_ioremap* inline and call
__devm_ioremap with different devm_ioremap_type.
After apply the patch, the size of devres.o can be reduce from
8216 Bytes to 8052 Bytes in my compile environment.
Suggested-by: Greg KH <[email protected]>
Suggested-by: Christophe LEROY <[email protected]>
Signed-off-by: Yisheng Xie <[email protected]>
Reviewed-by: Christophe LEROY <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Width 20 given in format string is larger than destination
buffer 'type[20]', use %19s to prevent overflowing it.
Fixes: bbecb07fa0af ("siox: new driver framework for eckelmann SIOX")
Cc: stable <[email protected]>
Reported-by: David Binderman <[email protected]>
Signed-off-by: Gavin Schenk <[email protected]>
Reviewed-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
/dev/nvram was never meant to be used alongside the RTC CMOS driver from
drivers/rtc as it already expose the NVRAM through another interface..
Anyway, the last defconfig to enable it properly was removed in 2010 so
prevent ARM users from selecting it.
Signed-off-by: Alexandre Belloni <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The functions rts5260_get_ocpstat, rts5260_get_ocpstat2,
rts5260_clear_ocpstat, rts5260_process_ocp, rts5260_init_hw and
rts5260_set_aspm are local to the source and do not need to be
in global scope, so make them static.
Cleans up sparse warnings:
symbol 'rts5260_get_ocpstat' was not declared. Should it be static?
symbol 'rts5260_get_ocpstat2' was not declared. Should it be static?
symbol 'rts5260_clear_ocpstat' was not declared. Should it be static?
symbol 'rts5260_process_ocp' was not declared. Should it be static?
symbol 'rts5260_init_hw' was not declared. Should it be static?
symbol 'rts5260_set_aspm' was not declared. Should it be static?
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
register_blkdev() and __register_chrdev_region() treat the major
number as an unsigned int. So print it the same way to avoid
absurd error statements such as:
"... major requested (-1) is greater than the maximum (511) ..."
(and also fix off-by-one bugs in the error prints).
While at it, also update the comment describing register_blkdev().
Signed-off-by: Srivatsa S. Bhat <[email protected]>
Reviewed-by: Logan Gunthorpe <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CHRDEV_MAJOR_DYN_END and CHRDEV_MAJOR_DYN_EXT_END are valid major
numbers. So fix the loop iteration to include them in the search for
free major numbers.
While at it, also remove a redundant if condition ("cd->major != i"),
as it will never be true.
Signed-off-by: Srivatsa S. Bhat <[email protected]>
Reviewed-by: Logan Gunthorpe <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Never directly free @dev after calling device_register(), even
if it returned an error! Always use put_device() to give up the
reference initialized.
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The CPU_AT32AP700X symbol symbol went away when when AVR32 was removed
in commit 26202873bb51 ("avr32: remove support for AVR32 architecture")
Remove the prompt from ATMEL_TCB_CLKSRC_BLOCK. The prompt condition
could never be satisfied now.
Discovered with the
https://github.com/ulfalizer/Kconfiglib/blob/master/examples/list_undefined.py
script.
Signed-off-by: Ulf Magnusson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Currently the driver spams the kernel log on unsupported ioctls which is
unnecessary as the ioctl returns -ENOIOCTLCMD to indicate this anyway.
I suspect this was originally for debugging purposes but it really is not
required so remove it.
Signed-off-by: Colin Ian King <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Limit the number of queued writes per client.
Writes above this threshold are blocked till place
in the transmit queue is available.
The limit is configurable via sysfs and defaults to 50.
The implementation should provide blocking I/O behavior.
Prior to this change one would end up in the hands of OOM.
Signed-off-by: Alexander Usyskin <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Module reference counting is relevant only to the
mei client devices. Make the implementation clean
and move it to bus.c
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
remove unused dead code
Cc: Srinivas Kandagatla <[email protected]>
Cc: Shawn Guo <[email protected]>
Signed-off-by: Dong Aisheng <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
imx-ocotp is implemented based on nvmem which can have data cells
as child node. Update the binding doc to reflect it to be more easily
understood by users.
Cc: Srinivas Kandagatla <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Shawn Guo <[email protected]>
Signed-off-by: Dong Aisheng <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
It seems that doing some operation will make the value pre-read on H3
SID controller wrong again, so all operation should be performed by
register.
Change the SID reading to use register only.
Signed-off-by: Icenowy Zheng <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The i.MX7 family has similar SNVS hardware so make the snvs-lpgpr
support it along with the i.MX6 family. The register interface is the
same except for the number and offset of the general purpose registers.
Signed-off-by: Andrey Yurovsky <[email protected]>
Reviewed-by: Oleksij Rempel <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|