Add an optional device tree parameter
parade,fb_blanking_disabled
This parameter controls the blanking notifier.
If the parameter is set in the device tree,
the parade device will NOT change its state
according to the state of the framebuffer
device.
POWER_SUPPLY_PROP_STATUS_EX_CHANGING and POWER_SUPPLY_PROP_STATUS_EX_UNKNOWN
is added to the set of defined values for the power supply status_ex property.
This is required to indicate to userspace that an interrupt has occured,
and that the connection state is changing, and if the new connection state
could not be read, the status is unknown.
In order to do a set of operations in sequence while disabling FGCC,
two macros are defined to start by disabling FGCC mode end finish by
re-enabling FGCC mode, while ensuring that the operation is not interrupted
by another similar sequence by applying the same lock as used in the
MAX77818_DO_NON_FGCC_OP macro when starting the operation and releasing
the lock when finishin the opration.
In order for the FGCC flag to be flipped from modules/drivers external to the
max77818-battery driver, the FGCC enable/disable routine and corresponding
macro doing a non-FGCC operation by flipping the FGCC bit to disable FGCC,
do the operation and re-enable FGCC is moved to an external module max77818-utils.
All operations performed by charger driver which require FGCC mode to be disabled
in order for the driver to be able to communicate with the charger device
basically do the following which now are done with the MAX77818_DO_NON_FGCC_OP
macro:
Disable FGCC
Do required operation
Re-enable FGCC
In order for the MAX77818 driver to be able to set the max current separately
for the two VBUS lines, a new property was added (POWER_SUPPLY_PROP_CURRENT_MAX2),
enabling POWER_SUPPLY_PROP_CURRENT_MAX to configure USB1 max current draw and
POWER_SUPPLY_PROP_CURRENT_MAX2 to configure USB2 max current respectively.
- Remove duplicate code for reading and writing vcom voltage
- Don't interrupt resume command if vcom not set
- Add sysfs attribute for setting vcom runtime (HACK)
- Make regulator microvolts return microvolts (was millivolts)
- Remove i2c based PGOOD usage to simplify code
- Reduce timeout value to 100ms
- Add mutex locking for enable/disable, so they don't confuse each other
- Register GPIO before regulator, to avoid race
In order to reduce the overhead as much as possible in the wait loop, the
PGOOD GPIO is used if given in devicetree. If not, the wait loop reads the
FAULT FLAG register to obtain the PGOOD status.
In order to make sure that all the rails are valid from the EPD PMIC when
sending new frames to the EPD, a wait loop has been introduced in the
regulator enable op waiting max 500 ms for PWR GOOD signal from EPD PMIC
before returning from the enable op.
The lcdif driver can then check the return code from the regulator_enable
call and if good, all the EPD power rails are ready.
Read tGain/tOFF/tCurve from DT during driver init.
Note:
FG/battery driver has to re-init the device for changes to occur on
already configured devices, and this is normally only done right after
initial power-on with un-configured device.
A solution for this is however under development, which will make sure
that selected FG parameters are validated during each boot.
Add an optional device tree parameter
cy,fb_blanking_disabled
This parameter controls the blanking notifier.
If the parameter is set in the device tree,
the cyttsp5 device will NOT change its state
according to the state of the framebuffer
device.
Add multi-function device to interface the
sy7636a EPD PMIC chip from Silergy.
- Regulator driver for VCOM
- Hwmon driver for thermistor temperature
- MFD driver for i2c regmap
- Fix typo in devicetree causing pincontrol not being registered
- Change pin mux states to use both RX and TX pin
- Implement preliminary first attempt to communicate over ow (wip)
- Add registration as extcon device
- Add ow tty property in device-tree
- Add ow gpio property in device-tree
- Add GPIO IRQ initiation/hanndling in delayed worker
Besides "Charger" and "OTG Supply", it supports the third state "Off"
for charger_mode property. To set the propety to "Off" state, either of
the following command should work.
1. $ echo 2 > /sys/class/power_supply/max77818-charger/charger_mode
2. $ echo Off > /sys/class/power_supply/max77818-charger/charger_mode
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
With max77818 mfd, charger, battery and regulator drivers being
cleaned up, these headers are now unneeded. Remove them.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
- Fix kernel WARNING below, which is caused by irq_set_status_flags()
with argument IRQ_NOAUTOEN and enable_irq().
WARNING: CPU: 1 PID: 1 at kernel/irq/manage.c:1390 __setup_irq+0x6d0/0x71c
- Improve coding style of the driver to make it a classic Linux style
driver.
- Clean up unused and unnecessary codes, like IO accessors, IRQ helpers,
as sub-device driver can handle these on their own needs.
- Drop unnecessary mutex locking.
- Save functions max77818_pmic_irq_int(), max77818_pmic_setup() and
max77818_destroy() by putting related code into .probe/.remove to
simplify calling sequence.
- Drop max77818_pmic_get_platdata() since we do not need to parse
"max77818,int-gpio" property to get IRQ number on our (recent) kernel
version.
- Add .of_compatible field into max77818_devices[], so that sub-device
driver doesn't need to find and attach their of_node.
- Use module_i2c_driver() to save max77818_init() and max77818_exit().
- Clean up include/linux/mfd/max77818/max77818.h to drop unused stuff.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
The max77818 battery block is simillar to max17042_battery, so we choose
to create max77818_battery by reusing majority of max17042_battery
driver code.
The max77818_battery reuses header max17042_battery.h directly and adds
max77818 specific defines in there. But we do not reuse max17042_battery.c
directly, because it supports I2C device probing while we need platform
device probing. Also the startup sequence and initialization is quite
different between max17042 and max77818. So we end up creating a new
max77818_battery driver with max77818 specific custom parameter parsing
from DT and startup sequence implementation. The majority of
.get_property/.set_property code are copied from max17042 driver, and
we support two more properties, TIME_TO_EMPTY_NOW and TIME_TO_FULL_NOW,
with max77818 driver though.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
The layerblend units don't contain the CONTROLWORD, CURPIXELCNT,
LASTPIXELCNT and PERFCOUNTER registers, so let's remove them
and their wrappers(no one is calling them), which were introduced
accidentally.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Add drm_mode_config_helper_suspend/resume() which takes care of
atomic modeset suspend/resume for simple use cases.
The suspend state is stored in struct drm_mode_config.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171106191812.38927-3-noralf@tronnes.org
drm_fb_helper is *the* way of doing fbdev emulation so add a pointer to
struct drm_device. This makes it possible to add callback helpers for
.last_close and .output_poll_changed further reducing fbdev emulation
footprint in drivers. The pointer is set by drm_fb_helper_init() and
cleared by drm_fb_helper_fini().
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171030153951.56269-3-noralf@tronnes.org