summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-01-17ARM: configs: aspeed: Add W83773G driverdev-4.10Joel Stanley2-0/+2
OpenBMC-Staging-Count: 1 Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-17ARM: dts: aspeed: romulus: Add w83773g temp sensorLei YU1-1/+4
OpenBMC-Staging-Count: 1 Signed-off-by: Lei YU <mine260309@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-17hwmon: (w83773g) Fix fault detection and reportingGuenter Roeck1-1/+1
Smatch reports: drivers/hwmon/w83773g.c:105 get_fault() warn: shift has higher precedence than mask Code analysis shows that the code is indeed wrong. Fix it, and while we are at it, drop unnecessary typecast. OpenBMC-Staging-Count: 1 Fixes: 86a10c802362 ("hwmon: Add W83773G driver") Cc: Lei YU <mine260309@gmail.com> Reviewed-by: Lei YU <mine260309@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-17hwmon: Add W83773G driverLei YU3-0/+340
Nuvoton W83773G is a hardware monitor IC providing one local temperature and two remote temperature sensors. OpenBMC-Staging-Count: 1 Signed-off-by: Lei YU <mine260309@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-17hwmon: (w83773g) Add documentationLei YU1-0/+33
Add documentation for the w83773g driver. OpenBMC-Staging-Count: 1 Signed-off-by: Lei YU <mine260309@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16ARM: dts: aspeed: zaius: Add pcie-e2b-present gpio keyLei YU1-0/+6
Add GPIO key to check presence of PCIE E2B OpenBMC-Staging-Count: 1 Signed-off-by: Lei YU <mine260309@gmail.com> Acked-by: Xo Wang <xow@google.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16hwmon: (pmbus/ir35221) Remove unnecessary scalingSamuel Mendoza-Jonas1-165/+0
The ir35221 datasheet describes specific scaling factors for a number of commands which the current driver applies when reading. However now that the ir35221 has been tested on machines with more easily verifiable readings these descriptions have turned out to be superfluous and reading each command according to the linear format is sufficient. OpenBMC-Staging-Count: 1 Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16hwmon (occ): Fix integer overflow in multiplicationEddie James1-9/+9
Power values were overflowing INT_MAX when being converted to microwatts, even though the storage was sufficiently large (unsigned 64 bit). Change literals to unsigned long long. Also change tmep storage to u32 to avoid overflows at 65000 millidegrees. OpenBMC-Staging-Count: 1 Signed-off-by: Edward A. James <eajames@us.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16gpio: aspeed: Add support for reset toleranceAndrew Jeffery1-2/+37
Use the new pinconf parameter for state persistence to expose the associated capability of the Aspeed GPIO controller. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit 1b43d26985745901c87e0dca44c9b57896062306) Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16gpio: gpiolib: Generalise state persistence beyond sleepAndrew Jeffery9-6/+104
General support for state persistence is added to gpiolib with the introduction of a new pinconf parameter to propagate the request to hardware. The existing persistence support for sleep is adapted to include hardware support if the GPIO driver provides it. Persistence continues to be enabled by default; in-kernel consumers can opt out, but userspace (currently) does not have a choice. The *_SLEEP_MAY_LOSE_VALUE and *_SLEEP_MAINTAIN_VALUE symbols are renamed, dropping the SLEEP prefix to reflect that the concept is no longer sleep-specific. I feel that renaming to just *_MAY_LOSE_VALUE could initially be misinterpreted, so I've further changed the symbols to *_TRANSITORY and *_PERSISTENT to address this. The sysfs interface is modified only to keep consistency with the chardev interface in enforcing persistence for userspace exports. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit e10f72bf4b3e8885c1915a119141481e7fc45ca8) Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16gpio: core: Decouple open drain/source flag with active low/highLaxman Dewangan4-6/+13
Currently, the GPIO interface is said to Open Drain if it is Single Ended and active LOW. Similarly, it is said as Open Source if it is Single Ended and active HIGH. The active HIGH/LOW is used in the interface for setting the pin state to HIGH or LOW when enabling/disabling the interface. In Open Drain interface, pin is set to HIGH by putting pin in high impedance and LOW by driving to the LOW. In Open Source interface, pin is set to HIGH by driving pin to HIGH and set to LOW by putting pin in high impedance. With above, the Open Drain/Source is unrelated to the active LOW/HIGH in interface. There is interface where the enable/disable of interface is ether active LOW or HIGH but it is Open Drain type. Hence decouple the Open Drain with Single Ended + Active LOW and Open Source with Single Ended + Active HIGH. Adding different flag for the Open Drain/Open Source which is valid only when Single ended flag is enabled. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit 4c0facddb7d88c78c8bd977c16faa647f079ccda) Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16gpiolib: Convert fwnode_get_named_gpiod() to configure GPIOAndy Shevchenko7-40/+45
Make fwnode_get_named_gpiod() consistent with the rest of gpiod_get() like API, i.e. configure GPIO pin immediately after request. Besides obvious clean up it will help to configure pins based on firmware provided resources. Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit a264d10ff45c688293d9112fddd8d29c819e0853) Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16hwmon (pmbus): cffps: Add led class device for power supply fault ledEddie James1-8/+88
This power supply device doesn't correctly manage it's own fault led. Add an led class device and register it so that userspace can manage power supply fault led as necessary. OpenBMC-Staging-Count: 1 Signed-off-by: Eddie James <eajames@linux.vnet.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16hwmon: (pmbus) cffps: Add debugfs entriesEddie James1-1/+201
Add debugfs entries for additional power supply data, including part number, serial number, FRU number, firmware revision, ccin, and the input history of the power supply. The input history is 10 minutes of input power data in the form of twenty 30-second packets. Each packet contains average and maximum power for that 30 second period. OpenBMC-Staging-Count: 1 Signed-off-by: Edward A. James <eajames@us.ibm.com> [groeck: Fixed endianness problem] Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16hwmon: (pmbus) cffps: Add PMBUS_SKIP_STATUS_CHECKEddie James1-0/+6
This power supply device regularly fails to read VOUT_MODE due to the CML bit going high. This results in an incorrect exponent used for the voltage data, and therefore the power supply reports incorrect voltage. Work around this by setting the pmbus flag to skip the CML check. OpenBMC-Staging-Count: 1 Signed-off-by: Eddie James <eajames@linux.vnet.ibm.com> Fixes: f69316d62c70 ("hwmon: (pmbus) Add IBM Common Form Factor (CFF) ...") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16hwmon: (pmbus) Export pmbus device debugfs directory entryEdward A. James2-0/+9
Pmbus client drivers, if they want to use debugfs, should use the same root directory as the pmbus debugfs entries are using. Therefore, export the device dentry for the pmbus client. OpenBMC-Staging-Count: 1 Signed-off-by: Edward A. James <eajames@us.ibm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16hwmon: (pmbus/core) Prevent unintentional setting of page to 0xFFEddie James2-17/+14
The pmbus core may call read/write word data functions with a page value of -1, intending to perform the operation without setting the page. However, the read/write word data functions accept only unsigned 8-bit page numbers, and therefore cannot check for negative page number to avoid setting the page. This results in setting the page number to 0xFF. This may result in errors or undefined behavior of some devices (specifically the ir35221, which allows the page to be set to 0xFF, but some subsequent operations to read registers may fail). Switch the pmbus_set_page page parameter to an integer and perform the check for negative page there. Make read/write functions consistent in accepting an integer page number parameter. OpenBMC-Staging-Count: 1 Signed-off-by: Edward A. James <eajames@us.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2018-01-16ARM: dts: aspeed: romulus: hog GPIOS7Lei YU1-0/+6
GPIOS7 shall be pulled low for CPLD to continue the power up sequence. With this hogged as pull-low, the CPLD workaround can be removed in OpenBMC. OpenBMC-Staging-Count: 1 Signed-off-by: Lei YU <mine260309@gmail.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-12-12ARM: dts: Add S2600WF BMC MachineJames Feist2-0/+129
S2600WF is a Intel platform family with an Aspeed ast2500 BMC. OpenBMC-Staging-Count: 1 Signed-off-by: James Feist <james.feist@linux.intel.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-12-08ARM: dts: aspeed: quanta: add i2cmux for frusPatrick Venture1-24/+69
The memory riser frus on the board are controlled by a gpio mux. OpenBMC-Staging-Count: 1 Signed-off-by: Patrick Venture <venture@google.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-12-08ARM: dts: aspeed-g4: add serial gpio driver entryPatrick Venture1-0/+9
Adds the serial gpio driver entry for the aspeed ast2400. OpenBMC-Staging-Count: 1 Signed-off-by: Patrick Venture <venture@google.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-12-08ARM: dts: aspeed: zaius: move coin battery sensorPatrick Venture1-1/+6
Moved the coin battery sensor into a separate iio-hwmon instance to facilitate reading it as a separate hwmon instance. OpenBMC-Staging-Count: 1 Signed-off-by: Patrick Venture <venture@google.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-12-08ARM: dts: aspeed: quanta-q71l: move coin battery sensorPatrick Venture1-1/+6
Moved the coin battery sensor into a separate iio-hwmon instance to facilitate reading it as a separate hwmon instance. OpenBMC-Staging-Count: 1 Signed-off-by: Patrick Venture <venture@google.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-12-05pinctrl: aspeed: Rework strap register write logic for the AST2500Andrew Jeffery1-10/+16
Yong Li found that writes to the AST2500 strapping register were not properly supported by the Aspeed pinctrl core and provided a patch to rectify the problem. Several revisions of the patch were posted and ultimately v4 should have been applied, however some unfortunate liberal application of tags on my part lead to confusion between v3[1] and v4[2]. Generate the diff between v3 and v4 to apply as a fixup patch. [1] http://patchwork.ozlabs.org/patch/801662/ [2] http://patchwork.ozlabs.org/patch/802946/ Cc: Yong Li <sdliyong@gmail.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit 5241bd16c7576de3cf189e3e40b01bd4fa10f803) Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-12-05pinctrl: aspeed: Fix ast2500 strap register write logicYong Li2-2/+18
On AST2500, the hardware strap register(SCU70) only accepts write ‘1’, to clear it to ‘0’, must set bits(write ‘1’) to SCU7C Signed-off-by: Yong Li <sdliyong@gmail.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Tested-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit 1865af212dfa0819ca21c7e5c18c2a75202c1827) Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-12-05pinctrl: aspeed: Allow disabling Port D and Port E loopback modeRick Altherr1-2/+12
Port D and port E GPIO loopback modes are commonly enabled via hardware straps for use with front-panel buttons. When the BMC is powered off or fails to boot, the front-panel buttons are directly connected to the host chipset via the loopback to allow direct power-on and reset control. Once the BMC has booted, the loopback mode must be disabled for the BMC to take over control of host power-on and reset. Disabling these loopback modes requires writing to the hardware strap register which violates the current design of assuming the system designer chose the strap settings for a specific reason and they should be treated as read-only. Only the two bits of the strap register related to these loopback modes are allowed to be written and comments have been added to explain why. Signed-off-by: Rick Altherr <raltherr@google.com> Acked-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit c825676b0823fd43a4d08bf865f81bb188b51db1) Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-12-05ARM: dts: aspeed: quanta: add aliases for i2c pciePatrick Venture1-0/+115
Provide aliases to each i2c bus per labels added for each PCIe slot, etc, that are downstream beyond a mux. Signed-off-by: Patrick Venture <venture@google.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-12-05ARM: dts: quanta: i2c-2 idle disconnectsPeter Hanson1-0/+2
Two top-level pca954x muxes branch off Quanta q71l i2c-2 bus; they have different addresses, so there is no confusion in that sense. However, by default, the pca954x driver skips disconnecting the selected channel. This supports expected topologies, but will leave two channels selected at the same time when connected in parallel. This commit adds the i2c-mux-idle-disconnect property to both muxes to inform the driver that disconnecting is not optional on bus 2. Signed-off-by: Peter Hanson <peterh@google.com> Signed-off-by: Patrick Venture <venture@google.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-11-30ARM: dts: aspeed: witherspoon: Add power-button LEDVishwanatha Subbanna1-0/+4
This LED wired to GPIO R5 is integrated with power button OpenBMC-Staging-Count: 1 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> Reviewed-by: Brandon Wyman <bjwyman@gmail.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-11-30ARM: dts: aspeed: P8: Add checkstop gpio keyLei YU4-0/+41
The checkstop gpio key is missing in P8 systems. Define the checkstop gpio key for Barreleye, Firestone, Garrison, Palmetto so they can use it for checkstop monitor. OpenBMC-Staging-Count: 1 Signed-off-by: Lei YU <mine260309@gmail.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-11-30ARM: dts: aspeed: Rename aspeed-bmc-opp-flash-layout.dtsiJames Feist12-11/+11
Rename aspeed-bmc-opp-flash-layout.dtsi to openbmc-flash-layout.dtsi as this file is not open power specific. OpenBMC-Staging-Count: 1 Signed-off-by: James Feist <james.feist@linux.intel.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-11-30ARM: dts: aspeed: gpio controller register rangePatrick Venture1-1/+1
Instead of 4k, it should be 512 because the latter part of the memory region are registers for the serial gpio driver. OpenBMC-Staging-Count: 1 Signed-off-by: Patrick Venture <venture@google.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-11-30ARM: dts: aspeed: Ensure platform mux RMII1 for MAC0Andrew Jeffery3-0/+9
I noticed that Witherspoon was missing its pinctrl properties for the mac0 node. On auditing the rest of the DTS files, the MSN and Q71L platforms appeared to have the same issue. Add the pinctrl nodes to ensure MAC0 has RMII1 muxed. This provides mutual exclusion with the GPIO subsystem ensuring broken userspace can't interfere with networking. OpenBMC-Staging-Count: 1 Cc: Mykola Kostenok <c_mykolak@mellanox.com> Cc: Patrick Venture <venture@google.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Acked-by: Mykola Kostenok <c_mykolak@mellanox.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-11-14net/ncsi: Don't return error on normal responseSamuel Mendoza-Jonas1-17/+14
Several response handlers return EBUSY if the data corresponding to the command/response pair is already set. There is no reason to return an error here; the channel is advertising something as enabled because we told it to enable it, and it's possible that the feature has been enabled previously. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 04bad8bda9e25afe676a6f4452f3b304c1fdea16) Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-11-14net/ncsi: Improve general state loggingSamuel Mendoza-Jonas3-21/+92
The NCSI driver is mostly silent which becomes a headache when trying to determine what has occurred on the NCSI connection. This adds additional logging in a few key areas such as state transitions and calling out certain errors more visibly. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 9ef8690be13d8ae3130749fbcc0cc21e4e3f738c) Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-11-14Revert "net/ncsi: General state debugging"Joel Stanley3-68/+9
This reverts commit 61f3b32bd16707a18c2ff8ed23c8dafa7706fc6f. We will take the upstream version of this patch. OpenBMC-Staging-Count: 1 Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-11-08ARM: dts: aspeed: romulus: Fix identify LEDLei YU1-1/+1
The identify LED is different from other LEDs and shall be ACTIVE_HIGH. OpenBMC-Staging-Count: 1 Signed-off-by: Lei YU <mine260309@gmail.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-11-08net/ncsi: General state debuggingSamuel Mendoza-Jonas3-9/+68
While relatively noisy this helps to debug NCSI state transitions and the state of channels beyond the existing "down" or "up" messages that the driver currently has. OpenBMC-Staging-Count: 1 Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-11-01drivers (fsi): occ: Change errno for releasing client during transferEdward A. James1-3/+1
Clients were receiving the ECANCELED errno when the client is removed during a transfer. Use ENODEV instead, as ECANCELED is for AIO ops. OpenBMC-Staging-Count: 1 Signed-off-by: Edward A. James <eajames@us.ibm.com> Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2017-10-31ARM: dts: aspeed: romulus: Add aspeed fan tachLei YU1-91/+47
Romulus uses aspeed fan tach instead of max31785: * Pass1's max31785 is always reset by CPLD; * Pass2's max31785 is not connected. The board has 7 fan taches connected to BMC_FANTACH8~14, and controlled by two PWMs. This commit also change "enabled" to "okay" for the i2c devices. OpenBMC-Staging-Count: 1 Signed-off-by: Lei YU <mine260309@gmail.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2017-10-31ARM: aspeed: romulus: Add reset tolerance for power GPIOsLei YU1-0/+10
This is a similar change as Witherspoon, that enables the host to stay up across BMC reboots. OpenBMC-Staging-Count: 1 Signed-off-by: Lei YU <mine260309@gmail.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2017-10-31drivers: i2c: fsi: Add proper abort methodEdward A. James1-69/+216
Driver wasn't cleaning up on timeout or in an error situation properly. Need to do a full reset if we fail in order to re-stablish a good state of the engine. OpenBMC-Staging-Count: 1 Signed-off-by: Edward A. James <eajames@us.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2017-10-31drivers (fsi): sbefifo: Add timeout for waiting for dataEdward A. James1-0/+18
During a transfer, in the event that the SBE isn't running, the driver will wait for data to appear in the FIFO forever. This doesn't work at BMC boot time if any transfers are attempted (by OCC driver probing, for example), as it will just hang the boot. So add a simple timeout mechanism when the driver reschdules waiting for data to show up in the FIFO. Tested on witherspoon by rebooting the BMC successfully with chassis power on. OpenBMC-Staging-Count: 1 Signed-off-by: Edward A. James <eajames@us.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2017-10-30ARM: dts: aspeed: Use new occ-hwmon driver for P8 systemsLei YU2-9/+9
Use the new occ-hwmon driver and compatible name for Barreleye and Garrison. OpenBMC-Staging-Count: 1 Signed-off-by: Lei YU <mine260309@gmail.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2017-10-30pmbus: core: Switch PAGE failure dev_warn() to dev_dbg() for serenityAndrew Jeffery1-3/+3
Reduce kernel log spam from PMBus core failing a PAGE command to the MAX37185 (and any other device). It's a hardware-design or driver related fault, and is not anything the user can fix. Therefore reduce it from warn to debug. OpenBMC-Staging-Count: 1 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Acked-by: Andrew Geissler <geissonator@gmail.com>
2017-10-27hwmon: pmbus: core: One-shot retries for failure to set pageAndrew Jeffery1-0/+11
Work around the shonky behaviour seen with the MAX31785 where we fail to set the page register in some circumstances. There's no real elegant way to do this. We can propagate the error up, but that forces us to retry the operation way up the call tree in any number of places. It also forces callers to split out pmbus_set_page() from the pmbus_{read,write}_{byte,word}_data() functions in order to differentiate between a failure to set the page and a failure to read a register (that might not exist, in which case an error is anticiptated). OpenBMC-Staging-Count: 1 Cc: Eddie James <eajames@linux.vnet.ibm.com> Cc: Matt Spinler <mspinler@linux.vnet.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Matt Spinler mspinler@linux.vnet.ibm.com
2017-10-27hwmon: pmbus: max31785: Mark virtual pages as virtualAndrew Jeffery1-0/+1
Avoid setting PAGE to a unsupported value on the MAX31785 to avoid errors from the hardware in circumstances that we know it will fail. The virtual pages are used to expose the non-standard tacho measurements for the second rotor of a dual-rotor fan. Maxim's implementation breaks with the PMBus standard by providing a four-byte response to what is usually a two-byte command. OpenBMC-Staging-Count: 1 Cc: Eddie James <eajames@linux.vnet.ibm.com> Cc: Matt Spinler <mspinler@linux.vnet.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Matt Spinler mspinler@linux.vnet.ibm.com
2017-10-27hwmon: pmbus: core: Add virtual page config bitAndrew Jeffery2-4/+10
Some circumstances call for virtual pages to expose multiple values packed into an extended PMBus register in a manner non-compliant with the PMBus standard. We should not try to set virtual pages on the device; add a flag so we can avoid doing so. OpenBMC-Staging-Count: 1 Cc: Eddie James <eajames@linux.vnet.ibm.com> Cc: Matt Spinler <mspinler@linux.vnet.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Matt Spinler mspinler@linux.vnet.ibm.com
2017-10-27drivers (hwmon): occ: Fix memory allocation for extended sensorsEdward A. James1-1/+1
If extended sensors are present, the driver is doing bad memory access since we weren't allocating enough memory for the extended sensors. Fix this with proper allocation for extended sensor attributes. OpenBMC-Staging-Count: 1 Signed-off-by: Edward A. James <eajames@us.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2017-10-26drivers (fsi): sbefifo: Fix xfr deletion in listsEdward A. James1-7/+12
Deleting an element of a list while iterating means that you'll access recently freed memory when getting the next list element. OpenBMC-Staging-Count: 1 Signed-off-by: Edward A. James <eajames@us.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>