1
0
Fork 0
Commit Graph

96804 Commits (redonkable)

Author SHA1 Message Date
Michal Koziel c799511f3f pt: fb blanking configurable in devtree
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.
2021-05-05 09:51:21 +02:00
Michal Koziel 2ac5ccb2db touch: imported pt (Parade TrueTouch Gen5 Touchscreen Driver) 2021-05-05 09:51:21 +02:00
Lars Ivar Miljeteig c3c91540de regulator: sy7636a: Remove unused mutex
The reglock mutex is now only used in the regulator code,
and the built-in mutexes in the regulator framework does
the same thing.
2021-03-12 11:14:00 +01:00
Lars Ivar Miljeteig 26d7f2f9df max77818: Add licensing info 2020-10-08 20:41:29 +02:00
Steinar Bakkemo ddbca62a46 max77818-battery-utils: add output of op_descr in START_FGCC_OP/FINISH_FGCC_OP 2020-10-08 20:41:27 +02:00
Steinar Bakkemo d40f460a8d max77818-battery-utils: add dyn debug indicating lock/unlock during FGCC ops 2020-10-08 20:41:26 +02:00
Steinar Bakkemo 20aabc4eb1 max77818-mfd/battery-utils: fix possible kernel panic on missing ptr 2020-10-08 20:41:26 +02:00
Steinar Bakkemo f21c4b9ab3 power-supply: add changing and unknown to POWER_SUPPLY_PROP_STATUS_EX
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.
2020-10-08 20:41:25 +02:00
Steinar Bakkemo de8a5c1952 max77818-utils: add MAX77818_START_NON_FGCC_OP/MAX77818_FINISH_NON_FGCC_OP
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.
2020-10-08 20:41:25 +02:00
Steinar Bakkemo fa988b33eb max77818-battery/battery-utils: move FGCC handling to new max77818-utils module
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.
2020-10-08 20:41:25 +02:00
Steinar Bakkemo c97f033c81 max77818-battery: add MAX77818_DO_NON_FGCC_OP macro to standardize FGCC flip ops
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
2020-10-08 20:41:25 +02:00
Steinar Bakkemo 8ab4975d96 power-supply: add support for setting max current for USB1/USB2 separately
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.
2020-10-08 20:41:25 +02:00
Lars Ivar Miljeteig 15da38e5b2 sy7636a: VCOM sysfs attributes and fix vcom read
- 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)
2020-10-08 20:41:25 +02:00
Lars Ivar Miljeteig 7876084d33 sy7636a-regulator: Add mutex, remove i2c-pgood, reduce timeout
- 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
2020-10-08 20:41:24 +02:00
Lars Ivar Miljeteig 29e61876d2 sy7636-regulator: PGOOD gpio wait loop in regulator_enable
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.
2020-10-08 20:41:24 +02:00
Steinar Bakkemo d222246bc0 sy7636a regulator: add wait loop in enable op checking pwr_good before returning
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.
2020-10-08 20:41:24 +02:00
Steinar Bakkemo 898a9919bf max77818-battery: fix ordering of new smart charge register definitions
Correct FG parameter ordering (by register offset)
2020-10-08 20:41:20 +02:00
Steinar Bakkemo 41f6aa6aa3 max77818-battery: add support for DT params related to smart charging/FGCC
Add support for new params defined in DT (register definitions/driver init):
    TAlrtTh
    TAlrtTh2
    JEITA_Curr
    JEITA_Volt
    ChargeState0..7
2020-10-08 20:41:20 +02:00
Thomas Ingebretsen 3b3aa48d1a evdev: Applied patch https://patchwork.kernel.org/patch/11049457/ to be able to set custom timestamps for input events. 2020-10-08 20:41:19 +02:00
Lars Ivar Miljeteig fc8d4cb0e1 sy7636a: Remember vcom value after deep sleep
Store vcom value when suspending, and restore
value when resuming.
2020-10-08 20:41:18 +02:00
Steinar Bakkemo e9e3814946 max77818-battery: add support for tGain/tOFF/tCurve FG params
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.
2020-10-08 20:41:18 +02:00
Steinar Bakkemo ef355be946 power-supply: add POWER_SUPPLY_PROP_STATUS_EX property with enumarated values 2020-10-08 20:41:17 +02:00
Lars Ivar Miljeteig bd16c306a1 cyttsp5: fb blanking configurable in devtree
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.
2020-10-08 20:07:15 +02:00
Lars Ivar Miljeteig 26f5dca610 sy7636a EPD PMIC driver initial commit
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
2020-10-08 20:07:13 +02:00
Steinar Bakkemo 1e1203e926 otgcontrol: move include/linux/rm-otgcontrol.h => drivers/misc/rm-otgcontrol/ 2020-10-08 20:06:40 +02:00
Steinar Bakkemo 658de5096b otgcontrol: add synchronization helpers for synchronization of flags
Add synchronization to one_wire_gpio_irq_is_handling flag checked and
set by GPIO IRQ handler and reset by GPIO IRQ worker.
2020-10-08 20:06:39 +02:00
Steinar Bakkemo a43aaee241 otgcontrol: move pdata properties from otgc_data to otgc_data->pdata structure 2020-10-08 20:06:30 +02:00
Steinar Bakkemo d6cdbfc9bb otgcontrol: adjust to 8 char tab width and squeeze code within 80 chars, dyndbg
Convert printk's to dev_dbg.

Fix tabs (8 chars) and wrap lines to fit within 80 chars, according to kernel
standards.
2020-10-08 20:03:39 +02:00
Steinar Bakkemo 55de395473 otgcontrol: improve sysfs attribute group allocation
Add static sysfs attribute definitions										.
Add attribute group de-allocation during un-init of the sysfs structures
2020-10-08 19:52:36 +02:00
Steinar Bakkemo de8d0dd5c8 otgcontrol: improve ow/pogo IRQ handling (500 ms debounce/filter), bugfix
Fix bug caused by calling wrong method when trying to switch USB OTG DR mode
2020-10-08 19:49:42 +02:00
Steinar Bakkemo 2833df5aa4 otgcontrol: implement initial FSM
Complete disabling of authenticated USB device connection in all modes

Code cleanup
- Spaces -> tabs
- Cleaner initiation sequence
2020-10-08 19:46:24 +02:00
Steinar Bakkemo e353de030a otgcontrol: add one-wire gpio irq handling
- 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
2020-10-08 19:27:33 +02:00
Steinar Bakkemo fac945efde otgcontrol: add excton device registration (emulate OTG VID signal -> OTG driver) 2020-10-08 19:25:40 +02:00
Steinar Bakkemo 5279a775da otgcontrol: rm-otgcontrol driver initial commit 2020-10-08 18:30:57 +02:00
Shawn Guo 8f1a13f38f max77818-charger: add POWER_SUPPLY_MODE_ALL_OFF for charger_mode property
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>
2020-10-08 01:38:41 +02:00
Shawn Guo 49eea8db6c mfd: max77818: remove unused headers
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>
2020-10-08 01:38:40 +02:00
Shawn Guo 585744b043 mfd: clean up max77818 driver code
- 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>
2020-10-08 01:38:40 +02:00
Shawn Guo 9a508cfbbf power: supply: add max77818 battery driver
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>
2020-10-08 01:38:39 +02:00
Steinar Bakkemo ccb451fa03 power-supply: add POWER_SUPPLY_PROP_CHARGER_MODE
Add new charger_mode sysfs property to standard power supply sysfs props.
2020-10-08 01:38:33 +02:00
Steinar Bakkemo 5bee878491 power-supply: add POWER_SUPPLY_PROP_CHARGER_MODE 2020-10-08 01:38:30 +02:00
Steinar Bakkemo 0b65333af4 max77818: fix power supply reg. issue causing kernal panic/add sep. max cur. adj
Extract powersupply config to static data structure.
Add support for setting max current separately for chgin/wcin.
2020-10-08 01:37:33 +02:00
Steinar Bakkemo e4c9b4df47 max77818: add max77818 driver (driver received from Maxim, ported to 4.14.79 kernel) 2020-10-08 01:37:04 +02:00
Steinar Bakkemo a808e2e497 brcmfmac: merge in latest driver from Cypress (including required wifi core module updates) 2020-10-08 01:31:33 +02:00
Lars Ivar Miljeteig c9ca7510b0 bd7181x: Add driver copied directly from vendor
NOTE: THIS WILL NOT BUILD, SEE NEXT COMMIT
2020-10-08 01:26:36 +02:00
Martin T. H. Sandsmark d7340a200f touch: Import cyttsp5 driver from Parade 2020-10-07 11:32:38 +02:00
Yong Gan 1bbc273bd5 MGS-4381 [#ccc] Refined the licence for the file viv-metadata.h
Change the licence to GPL.

Signed-off-by: Yong Gan <yong.gan@nxp.com>
2018-11-15 22:55:30 +08:00
Flynn xu 90e818a0ab MLK-20342 i2c: xen-i2cback/front: Add i2c_smbus interface
Add smbus_xfer interface in xen-i2cback/front driver.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Flynn xu <flynn.xu@nxp.com>
2018-11-13 17:46:50 +08:00
Liu Ying 9f7f845c12 MLK-20301 gpu: imx: dpu: layerblend: Remove several invalid registers & wrappers
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>
2018-11-09 17:14:32 +08:00
Noralf Trønnes fba83191e7 MLK-20181-5: drm/modeset-helper: Add simple modeset suspend/resume helpers
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
2018-11-08 15:07:05 +02:00
Noralf Trønnes b1c4df7077 MLK-20181-4: drm: Add drm_device->fb_helper pointer
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
2018-11-08 15:07:04 +02:00