03 Jul, 2018
1 commit
-
commit 065c09563c872e52813a17218c52cd642be1dca6 upstream.
1wire family module autoload fails because of upper/lower
case mismatch.Signed-off-by: Ingo Flaschberger
Acked-by: Evgeniy Polyakov
Cc: stable
Signed-off-by: Greg Kroah-Hartman
26 Jun, 2018
1 commit
-
commit 955bc61328dc0a297fb3baccd84e9d3aee501ed8 upstream.
According to the API, you may only call clk_get_rate() after actually
enabling it.Found by Linux Driver Verification project (linuxtesting.org).
Fixes: a5fd9139f74c ("w1: add 1-wire master driver for i.MX27 / i.MX31")
Signed-off-by: Stefan Potyra
Acked-by: Evgeniy Polyakov
Cc: stable
Signed-off-by: Greg Kroah-Hartman
02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
10 Sep, 2017
1 commit
-
Pull power supply and reset changes from Sebastian Reichel:
"New chip/feature support:
- bq27xxx: support updating battery config from DT
- bq24190: support loading battery charge info from DT
- LTC2941: add LTC2942/LTC2944 support
- max17042: add ACPI support
- max1721x: new driverMisc:
- Move bq27xxx w1 driver from w1 into power-supply subsystem
- Introduce power_supply_set_input_current_limit_from_supplier
- constify stuff
- some minor fixes"* tag 'for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (39 commits)
power: supply: bq27xxx: enable writing capacity values for bq27421
power: supply: bq24190_charger: Get input_current_limit from our supplier
power: supply: bq24190_charger: Export 5V boost converter as regulator
power: supply: bq24190_charger: Add power_supply_battery_info support
power: supply: bq24190_charger: Add property system-minimum-microvolt
power: supply: bq24190_charger: Enable devicetree config
dt-bindings: power: supply: Add docs for TI BQ24190 battery charger
power: supply: bq27xxx: Remove duplicate chip data arrays
power: supply: bq27xxx: Enable data memory update for certain chips
power: supply: bq27xxx: Add chip IDs for previously shadowed chips
power: supply: bq27xxx: Create single chip data table
power: supply: bq24190_charger: Add ti,bq24192i to devicetree table
power: supply: bq24190_charger: Add input_current_limit property
power: supply: Add power_supply_set_input_current_limit_from_supplier helper
power: supply: max17042_battery: Fix compiler warning
power: supply: core: Delete two error messages for a failed memory allocation in power_supply_check_supplies()
power: supply: make device_attribute const
power: supply: max17042_battery: Fix ACPI interrupt issues
power: supply: max17042_battery: Add support for ACPI enumeration
power: supply: lp8788: Make several arrays static const * const
...
01 Sep, 2017
3 commits
-
This change adds hwmon temp support for w1_therm.
Signed-off-by: Jaghathiswari Rankappagounder Natarajan
Acked-by: Evgeniy Polyakov
Acked-by: Guenter Roeck
Signed-off-by: Greg Kroah-Hartman -
Inside the w1_slave_show function refactor the code to read the temp
into a separate function.Signed-off-by: Jaghathiswari Rankappagounder Natarajan
Acked-by: Guenter Roeck
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
This patch has changes to w1.h/w1.c generic files to add (optional) hwmon
support structures.Signed-off-by: Jaghathiswari Rankappagounder Natarajan
Acked-by: Evgeniy Polyakov
Acked-by: Guenter Roeck
Signed-off-by: Greg Kroah-Hartman
28 Aug, 2017
10 commits
-
Add a one wire driver for the DS28E05 one wire slave chip. This chip
requires OverDrive support to talk to it.Signed-off-by: Andrew Worsley
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
Extend the one wire DS2482 master driver with a module option that allows support
for PPM/SPU/1WS interface modes to be requested. This allows support of chips
that require one or more of these features such as the DS28E05.Signed-off-by: Andrew Worsley
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
The functions w1_ds2438_get_page, w1_ds2438_get_temperature,
w1_ds2438_change_config_bit and w1_ds2438_get_voltage are local to
the source and do not need to be in global scope, so make it static.Cleans up sparse warnings:
symbol 'w1_ds2438_get_page' was not declared. Should it be static?
symbol 'w1_ds2438_get_temperature' was not declared. Should it be static?
symbol 'w1_ds2438_change_config_bit' was not declared. Should it be static?
symbol 'w1_ds2438_get_voltage' was not declared. Should it be static?Signed-off-by: Colin Ian King
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
w1: ds1wm: add messages to make incorporation in mfd-drivers easier
Signed-off-by: Johannes Poehlmann
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
w1: ds1wm: silence interrupts on HW before claiming the interrupt.
This way avoid possible invalid interrupts in the initialization phase.Signed-off-by: Johannes Poehlmann
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
w1: ds1wm: add level interrupt modes
Signed-off-by: Johannes Poehlmann
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
o Make endian clean, make HW-endianness configurable.
o Use ioread*, iowrite* instead of __raw_readb,__raw_writeb
to also use memory-barriers when accessing HW-registers.
We do not want reordering to happen here.Both changes are tightly coupled, so I do them in one patch
Signed-off-by: Johannes Poehlmann
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
Replace incorrect register offsett calculation by
direct configuration of bus_shift in mfd-cell.Indirect definition of address-shift by resource size
was unobvious and was wrong (should have used a binary log).Signed-off-by: Johannes Poehlmann
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by work with
const usb_device_id. So mark the non-const structs as const.Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['.Signed-off-by: Arvind Yadav
Signed-off-by: Greg Kroah-Hartman -
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by work with
const attribute_group. So mark the non-const structs as const.Signed-off-by: Arvind Yadav
Signed-off-by: Greg Kroah-Hartman
25 Jul, 2017
1 commit
-
The HDQ interface driver should be in this folder just like the I2C
interface driver. Move this driver out of drivers/w1/slave and into
drivers/power/supply.Signed-off-by: Andrew F. Davis
Acked-by: Pali Rohár
Signed-off-by: Sebastian Reichel
17 Jul, 2017
2 commits
-
platform_get_irq() returns an error code, but the omap_hdq
driver ignores it and always returns -ENXIO. This is not correct,
and prevents -EPROBE_DEFER from being propagated properly.
Notice that platform_get_irq() no longer returns 0 on error.Print error message and propagate the return value of
platform_get_irq on failure.Signed-off-by: Gustavo A. R. Silva
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
1-Wire bus have very fast algorith for exchange with single slave
device. Fix incorrect count of slave devices on connect second slave
device. This case on slave device probe() step we need use generic
(multislave) functions for read/write device.Signed-off-by: Alex A. Mihaylov
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman
09 Jun, 2017
1 commit
-
Like other subsystems we should be able to define slave devices outside
of the w1 directory. To do this we move public facing interface
definitions to include/linux/w1.h and rename the internal definition
file to w1_internal.h.As w1_family.h and w1_int.h contained almost entirely public
driver interface definitions we simply removed these files and
moved the remaining definitions into w1_internal.h.With this we can now start to move slave devices out of w1/slaves and
into the subsystem based on the function they implement, again like
other drivers.Signed-off-by: Andrew F. Davis
Reviewed-by: Sebastian Reichel
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman
26 May, 2017
1 commit
-
Structures and functions should be ordered such that forward declaration
use is minimized.MODULE_* macros should immediately follow the structures and functions
upon which they act.Remaining MODULE_* macros should be at the end of the file in
alphabetical order.Signed-off-by: Andrew F. Davis
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman
09 Apr, 2017
2 commits
-
The only use of assert() is in matrox_w1.c and is used to check the input
to probe() from the PCI subsystem for NULL values, these are guaranteed
to be populated and no other PCI driver makes this check, remove this.As this was the only definition in w1_log.h, remove this also.
Signed-off-by: Andrew F. Davis
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Andrew F. Davis
Signed-off-by: Greg Kroah-Hartman
17 Mar, 2017
2 commits
-
Signed-off-by: Mariusz Bialonczyk
Signed-off-by: Greg Kroah-Hartman -
Detailed information about support and provided sysfs files
in my next commit which creates a documentation file:
Documentation/w1/slaves/w1_ds2438Signed-off-by: Mariusz Bialonczyk
Signed-off-by: Greg Kroah-Hartman
02 Mar, 2017
1 commit
-
We are going to split out of , which
will have to be picked up from other headers and a couple of .c files.Create a trivial placeholder file that just
maps to to make this patch obviously correct and
bisectable.Include the new header in the files that are going to need it.
Acked-by: Linus Torvalds
Cc: Mike Galbraith
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar
10 Feb, 2017
2 commits
-
module_w1_family() makes the code simpler by eliminating
boilerplate code.Signed-off-by: Wei Yongjun
Acked-by: Maciej S. Szmigiero
Signed-off-by: Greg Kroah-Hartman -
Use kmemdup rather than duplicating its implementation.
Generated by: scripts/coccinelle/api/memdup.cocci
Signed-off-by: Wei Yongjun
Acked-by: Maciej S. Szmigiero
Signed-off-by: Greg Kroah-Hartman
25 Jan, 2017
5 commits
-
Remove filename from file, this is not done anymore as it doesn't
add anything and usually is incorrect as filename change often.Also shorten the GPL to the more common address-less version and
remove excess white-space.Signed-off-by: Andrew F. Davis
Signed-off-by: Greg Kroah-Hartman -
Near the beginning of w1_attach_slave_device() we increment a w1 master
reference count.
Later, when we are going to exit this function without actually attaching
a slave device (due to failure of __w1_attach_slave_device()) we need to
decrement this reference count back.Signed-off-by: Maciej S. Szmigiero
Cc: stable@vger.kernel.org
Fixes: 9fcbbac5ded489 ("w1: process w1 netlink commands in w1_process thread")
Cc: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
This adds a driver for a DS2405 1-wire single-channel addressable switch.
The DS2405 can also work as a single-channel binary remote sensor.This driver supports two attributes: "state" and "output" which are the
same attribute names as supported by existing DS2406, DS2408 and DS2413
drivers.Signed-off-by: Maciej S. Szmigiero
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
ds2490 driver was doing USB transfers from / to buffers on a stack.
This is not permitted and made the driver non-working with vmapped stacks.Since all these transfers are done under the same bus_mutex lock we can
simply use shared buffers in a device private structure for two most common
of them.While we are at it, let's also fix a comparison between int and size_t in
ds9490r_search() which made the driver spin in this function if state
register get requests were failing.Signed-off-by: Maciej S. Szmigiero
Cc: stable
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
In case of error returned by '_omap_hdq_reset()', free resources as done
elsewhere in this function.This patch slighly changes the semantic of the code. It now propagates the
error code returned by '_omap_hdq_reset()' instead of returning -EINVAL
unconditionally.Signed-off-by: Christophe JAILLET
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman
31 Aug, 2016
4 commits
-
Fix 'timeout_us' parameter description.
Signed-off-by: Wei Yongjun
Signed-off-by: Greg Kroah-Hartman -
Correct pointer notations to include whitespace between
variable type and "*" character. Inserted blank line
after variable declatations at two locations.
Rearranged comparison within an if statment to have the
constant on the right-hand side.Signed-off-by: Ben Werbowyj
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
Assignment of variable count removed from within an if statment.
This was done at two locations in the file.Signed-off-by: Ben Werbowyj
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
Inserted whitespace between command and open parenthesis
at two locations. Removed new line between open brace and
command/declaration at two locations.Signed-off-by: Ben Werbowyj
Acked-by: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman
03 Aug, 2016
2 commits
-
Commit e93762bbf681 ("w1: masters: omap_hdq: add support for 1-wire
mode") added a statement to clear the hdq_irqstatus flags in
hdq_read_byte().If the hdq reading process is scheduled slowly or interrupts are
disabled for a while the hardware read activity might already be
finished on entry of hdq_read_byte(). And hdq_isr() already has set the
hdq_irqstatus to 0x6 (can be seen in debug mode) denoting that both, the
TXCOMPLETE and RXCOMPLETE interrupts occurred in parallel.This means there is no need to wait and the hdq_read_byte() can just
read the byte from the hdq controller.By resetting hdq_irqstatus to 0 the read process is forced to be always
waiting again (because the if statement always succeeds) but the
hardware will not issue another RXCOMPLETE interrupt. This results in a
false timeout.After such a situation the hdq bus hangs.
Link: http://lkml.kernel.org/r/b724765f87ad276a69625bc19806c8c8844c4590.1469513669.git.hns@goldelico.com
Signed-off-by: H. Nikolaus Schaller
Cc: Evgeniy Polyakov
Cc: Greg Kroah-Hartman
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The helper macro module_w1_family can be used in module drivers that
only register a w1 driver in their module init functions. Add this
macro and use it in all applicable drivers.Link: http://lkml.kernel.org/r/20160531204313.20979-2-afd@ti.com
Signed-off-by: Andrew F. Davis
Acked-by: Evgeniy Polyakov
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds