[PATCH] dt-bindings: Use portable sort for version cmp

2021-02-01 Thread Iskren Chernev
sort -C is like sort -c >/dev/null but less portable. It fails on busybox sort (i.e alpine linux). Signed-off-by: Iskren Chernev Fixes: ea5b8b5eb004 ("dt-bindings: Add a minimum version check for dtschema") --- Documentation/devicetree/bindings/Makefile | 2 +- 1 file changed, 1 in

[PATCH v3 1/2] dt-bindings: panel: Add Samsung S6E3FA2 panel

2021-02-01 Thread Iskren Chernev
The Samsung S6E3FA2 AMOLED cmd LCD panel is used on the Samsung Galaxy S5 (klte). Signed-off-by: Iskren Chernev --- Add a simple generated panel driver that supports on/off and the corresponding binding documentation. Changes in v3: - fix dt_binding_check issue with missing include - fix panel

[PATCH v3 2/2] drm/panel: Add panel for Samsung Galaxy S5

2021-02-01 Thread Iskren Chernev
The Samsung Galaxy S5 uses the samsung s6e3fa2 AMOLED cmd LCD panel. This driver was generated with [1], with the addition of mipi_dsi_dcs_set_display_on at the end of the on method. [1] https://github.com/msm8916-mainline/linux-mdss-dsi-panel-driver-generator Signed-off-by: Iskren Chernev

[PATCH v5 4/4] ARM: dts: qcom: msm8974-klte: Mark essential regulators

2021-02-01 Thread Iskren Chernev
s1 and l12 regulators are used for the memory and cache on the Samsung S5 (klte). If they are turned off the phone shuts down. So mark them as always-on to prevent that from happening. Signed-off-by: Iskren Chernev Tested-by: Alexey Minnekhanov --- arch/arm/boot/dts/qcom-msm8974-samsung

[PATCH v5 3/4] ARM: dts: qcom: msm8974-klte: add support for display

2021-02-01 Thread Iskren Chernev
From: Samuel Pascua Add initial support for the display found on the Samsung Galaxy 5 (klte) phone. This is based on work from Jonathan Marek & Brian Masney. Signed-off-by: Samuel Pascua [iskren.cher...@gmail.com: add reset gpio, regulators] Signed-off-by: Iskren Chernev --- On downstream

[PATCH v5 2/4] ARM: dts: qcom: msm8974-klte: add support for GPU

2021-02-01 Thread Iskren Chernev
From: Samuel Pascua Enable adreno dt node. Signed-off-by: Samuel Pascua [iskren.cher...@gmail.com: changes after v1] Signed-off-by: Iskren Chernev --- arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974

[PATCH v5 1/4] ARM: dts: qcom: msm8974: add gpu support

2021-02-01 Thread Iskren Chernev
From: Brian Masney Add support for the a3xx GPU. opp_table is chosen to include lower frequencies common to all different msm8974 variants. Signed-off-by: Brian Masney [iskren.cher...@gmail.com: change after v1] Signed-off-by: Iskren Chernev --- Update the panel/dsi patch according to new dt

[PATCH v2 2/2] drm/panel: Add panel for Samsung Galaxy S5

2021-02-01 Thread Iskren Chernev
The Samsung Galaxy S5 uses the samsung s6e3fa2 AMOLED cmd LCD panel. This driver was generated with [1], with the addition of mipi_dsi_dcs_set_display_on at the end of the on method. [1] https://github.com/msm8916-mainline/linux-mdss-dsi-panel-driver-generator Signed-off-by: Iskren Chernev

[PATCH v2 1/2] dt-bindings: panel: Add Samsung S6E3FA2 panel

2021-02-01 Thread Iskren Chernev
The Samsung S6E3FA2 AMOLED cmd LCD panel is used on the Samsung Galaxy S5 (klte). Signed-off-by: Iskren Chernev --- OK, miraculously the panel turns on and off now, so the simple-panel can graduate into its own driver. v1: https://lkml.org/lkml/2020/12/30/293 Changes in v2: - move bindings to

[PATCH v4 2/4] ARM: dts: qcom: msm8974-klte: add support for GPU

2021-01-28 Thread Iskren Chernev
From: Samuel Pascua Enable adreno dt nodes. Signed-off-by: Samuel Pascua [iskren.cher...@gmail.com: changes after v1] Signed-off-by: Iskren Chernev --- arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974

[PATCH v4 4/4] ARM: dts: qcom: msm8974-klte: Mark essential regulators

2021-01-28 Thread Iskren Chernev
s1 and l12 regulators are used for the memory and cache on the Samsung S5 (klte). If they are turned off the phone shuts down. So mark them as always-on to prevent that from happening. Signed-off-by: Iskren Chernev Tested-by: Alexey Minnekhanov --- arch/arm/boot/dts/qcom-msm8974-samsung

[PATCH v4 3/4] ARM: dts: qcom: msm8974-klte: add support for display

2021-01-28 Thread Iskren Chernev
From: Samuel Pascua Add initial support for the display found on the Samsung Galaxy 5 (klte) phone. This is based on work from Jonathan Marek & Brian Masney. Signed-off-by: Samuel Pascua Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts

[PATCH v4 1/4] ARM: dts: qcom: msm8974: add gpu support

2021-01-28 Thread Iskren Chernev
: Iskren Chernev --- Changes in v4: - change adreno compat string to 330.1 in msm8974 and 330.2 in msm8974pro - put opp_table node inside gpu node (similar to msm8916) - fix tabs-whenever-possible lint warning v3: https://lkml.org/lkml/2021/1/25/398 v2: https://lkml.org/lkml/2021/1/24/142 v1: https

Re: [PATCH 2/2] drm/panel: simple: add samsung,s6e3fa2 panel

2021-01-28 Thread Iskren Chernev
On 12/30/20 5:17 PM, Iskren Chernev wrote: > From: Samuel Pascua > > This panel is used on the Samsung Galaxy S5 (klte). > > Signed-off-by: Samuel Pascua > --- > drivers/gpu/drm/panel/panel-simple.c | 30 > 1 file changed, 30 inserti

[PATCH] drm/msm/mdp5: Fix wait-for-commit for cmd panels

2021-01-27 Thread Iskren Chernev
notifying a completion. The completion needs to be notified with complete_all so multiple waiting parties (new async committers) can proceed. Signed-off-by: Iskren Chernev Suggested-by: Rob Clark Fixes: 2d99ced787e3d ("drm/msm: async commit support") --- drivers/gpu/drm/msm/disp/mdp5/mdp5_

Re: [PATCH 1/4] ARM: dts: qcom: msm8974: add gpu support

2021-01-25 Thread Iskren Chernev
On 1/24/21 11:05 PM, Pavel Machek wrote: > On Sun 2021-01-24 15:56:07, Iskren Chernev wrote: >> From: Brian Masney >> >> Add support for the a3xx GPU > > This is phone, right? Can I ask phone-de...@vger.kernel.org to be > cc-ed? CC-ing phone-de...@vger.ker

[PATCH v3 2/4] ARM: dts: qcom: msm8974-klte: add support for GPU

2021-01-25 Thread Iskren Chernev
From: Samuel Pascua Enable adreno and opp_table dt nodes. Signed-off-by: Samuel Pascua Signed-off-by: Iskren Chernev --- arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm

[PATCH v3 1/4] ARM: dts: qcom: msm8974: add gpu support

2021-01-25 Thread Iskren Chernev
From: Brian Masney Add support for the a3xx GPU. opp_table is chosen to include lower frequencies common to all different msm8974 variants. Signed-off-by: Brian Masney [iskren.cher...@gmail.com: change opp-table values in v3] Signed-off-by: Iskren Chernev --- Changes in v3: - change opp-table

[PATCH v3 4/4] ARM: dts: qcom: msm8974-klte: Mark essential regulators

2021-01-25 Thread Iskren Chernev
s1 and l12 regulators are used for the memory and cache on the Samsung S5 (klte). If they are turned off the phone shuts down. So mark them as always-on to prevent that from happening. Signed-off-by: Iskren Chernev Tested-by: Alexey Minnekhanov --- arch/arm/boot/dts/qcom-msm8974-samsung

[PATCH v3 3/4] ARM: dts: qcom: msm8974-klte: add support for display

2021-01-25 Thread Iskren Chernev
From: Samuel Pascua Add initial support for the display found on the Samsung Galaxy 5 (klte) phone. This is based on work from Jonathan Marek & Brian Masney. Signed-off-by: Samuel Pascua Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts

[PATCH 2/4] ARM: dts: qcom: msm8974-klte: add support for GPU

2021-01-24 Thread Iskren Chernev
From: Samuel Pascua Enable adreno and opp_table dt nodes. Signed-off-by: Samuel Pascua Signed-off-by: Iskren Chernev Tested-by: Alexey Minnekhanov --- arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974

[PATCH 3/4] ARM: dts: qcom: msm8974-klte: add support for display

2021-01-24 Thread Iskren Chernev
From: Samuel Pascua Add initial support for the display found on the Samsung Galaxy 5 (klte) phone. This is based on work from Jonathan Marek & Brian Masney. Signed-off-by: Samuel Pascua Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts

[PATCH 4/4] ARM: dts: qcom: msm8974-klte: Mark essential regulators

2021-01-24 Thread Iskren Chernev
s1 and l12 regulators are used for the memory and cache on the Samsung S5 (klte). If they are turned off the phone shuts down. So mark them as always-on to prevent that from happening. Signed-off-by: Iskren Chernev Tested-by: Alexey Minnekhanov --- arch/arm/boot/dts/qcom-msm8974-samsung

[PATCH 1/4] ARM: dts: qcom: msm8974: add gpu support

2021-01-24 Thread Iskren Chernev
From: Brian Masney Add support for the a3xx GPU Signed-off-by: Brian Masney Signed-off-by: Iskren Chernev Tested-by: Alexey Minnekhanov Reviewed-by: Brian Masney --- Changes in v2: - base set to next-20210122 - add tags from v1 replies - add Signed-off-by: me on first three patches - add

Re: [PATCH] drm/msm: Fix MSM_INFO_GET_IOVA with carveout

2021-01-08 Thread Iskren Chernev
On 1/8/21 12:36 AM, Rob Clark wrote: > On Thu, Jan 7, 2021 at 9:20 AM Rob Clark wrote: >> >> On Sat, Jan 2, 2021 at 12:26 PM Iskren Chernev >> wrote: >>> >>> The msm_gem_get_iova should be guarded with gpu != NULL and not aspace >>> != NULL,

[PATCH] drm/msm: Fix MSM_INFO_GET_IOVA with carveout

2021-01-02 Thread Iskren Chernev
The msm_gem_get_iova should be guarded with gpu != NULL and not aspace != NULL, because aspace is NULL when using vram carveout. Fixes: 933415e24bd0d ("drm/msm: Add support for private address space instances") Signed-off-by: Iskren Chernev --- drivers/gpu/drm/msm/msm_drv.c | 3 +

[PATCH 4/4] ARM: dts: qcom: msm8974-klte: Mark essential regulators

2020-12-30 Thread Iskren Chernev
s1 and l12 regulators are used for the memory and cache on the Samsung S5 (klte). If they are turned off the phone shuts down. So mark them as always-on to prevent that from happening. Signed-off-by: Iskren Chernev --- arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 2 ++ 1 file changed, 2

[PATCH 3/4] ARM: dts: qcom: msm8974-klte: add support for display

2020-12-30 Thread Iskren Chernev
From: Samuel Pascua Add initial support for the display found on the Samsung Galaxy 5 (klte) phone. This is based on work from Jonathan Marek & Brian Masney. Please note that this patch depends on dt-binding patch in [1] [1] https://lkml.org/lkml/2020/12/30/293 Signed-off-by: Samuel Pascua --

[PATCH 2/4] ARM: dts: qcom: msm8974-klte: add support for GPU

2020-12-30 Thread Iskren Chernev
From: Samuel Pascua Signed-off-by: Samuel Pascua --- arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts index 97352de913142..1d5e8abdbda79

[PATCH 1/4] ARM: dts: qcom: msm8974: add gpu support

2020-12-30 Thread Iskren Chernev
From: Brian Masney Add support for the a3xx GPU Signed-off-by: Brian Masney --- arch/arm/boot/dts/qcom-msm8974.dtsi | 45 + 1 file changed, 45 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi index 51f5f904f9eb9.

[PATCH 1/2] drm/msm: Call msm_init_vram before binding the gpu

2020-12-30 Thread Iskren Chernev
From: Craig Tatlor vram.size is needed when binding a gpu without an iommu and is defined in msm_init_vram(), so run that before binding it. Signed-off-by: Craig Tatlor --- drivers/gpu/drm/msm/msm_drv.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 2/2] drm/msm: Add modparam to allow vram carveout

2020-12-30 Thread Iskren Chernev
Using the GPU with a VRAM Carveout is a security vulnerability. Nevertheless it is sometimes required, especially when no IOMMU implementation is available for a certain platform. Signed-off-by: Iskren Chernev --- drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 6 -- drivers/gpu/drm/msm/adreno

[PATCH 2/2] drm/panel: simple: add samsung,s6e3fa2 panel

2020-12-30 Thread Iskren Chernev
From: Samuel Pascua This panel is used on the Samsung Galaxy S5 (klte). Signed-off-by: Samuel Pascua --- drivers/gpu/drm/panel/panel-simple.c | 30 1 file changed, 30 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-si

[PATCH 1/2] dt-bindings: panel-simple: add samsung,s6e3fa2 panel

2020-12-30 Thread Iskren Chernev
Add samsung,s6e3fa2 in the allowed simple-panel compat strings. Signed-off-by: Iskren Chernev --- .../devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b

[PATCH 2/2] drm/msm: Ensure get_pages is called when locked

2020-12-28 Thread Iskren Chernev
get_pages is only called in a locked context. Add a WARN_ON to make sure it stays that way. Signed-off-by: Iskren Chernev --- drivers/gpu/drm/msm/msm_gem.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index

[PATCH 1/2] drm/msm: Fix null dereference in _msm_gem_new

2020-12-28 Thread Iskren Chernev
03f e593300c e1a04000 f590f000 (e1940f9f) ---[ end trace 277e2a3da40bbb76 ]--- Fixes: 6c0e3ea250476 ("drm/msm/gem: Switch over to obj->resv for locking") Signed-off-by: Iskren Chernev --- drivers/gpu/drm/msm/msm_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

Re: [RFC 18/18] power: supply: max17040: Do not enforce (incorrect) interrupt trigger type

2020-12-11 Thread Iskren Chernev
erstand how the DT irq flag ends up being used by the kernel. It is never explicitly read from DT or passed to interrupt API, only i2c->irq, which is a pure int. Fixing the DT and the drivers will hopefully set a precedent, so future drivers (when copied/tweaked from existing drivers)

Re: [PATCH 11/18] ARM: dts: qcom: msm8974-lge-nexus5: correct fuel gauge interrupt trigger level

2020-12-11 Thread Iskren Chernev
ult"; >              pinctrl-0 = <&fuelgauge_pin>; According to the datasheet for max17048 the ALRT pin is active low, so that looks good. The reason it was implemented EDGE_FALLING is mostly due to fragments taken from downstream, and the fact that it worked :) Acked-by: Iskren Chernev

Re: [PATCH 12/18] ARM: dts: qcom: msm8974-samsung-klte: correct fuel gauge interrupt trigger level

2020-12-11 Thread Iskren Chernev
gauge_pin>; After testing this patch + the rfc modifying 17040 driver I can confirm it works on the klte. Also, according to the max17048 datasheet, the ALRT pin is active low, so everything is in order. Acked-By: Iskren Chernev Tested-By: Iskren Chernev

Re: [PATCH] drm/msm: Fix WARN_ON() splat in _free_object()

2020-12-10 Thread Iskren Chernev
ree_object(struct drm_gem_object *obj) >      } else { >          msm_gem_vunmap(obj); >          put_pages(obj); > +        put_iova_vmas(obj); >          msm_gem_unlock(obj); >      } > > -    put_iova_vmas(obj); > - >      drm_gem_object_release(obj); > >      kfree(msm_obj); Ah, the put_iova_vmas needs to happen inside the msm_gem_lock|unlock. My bad! Acked-by: Iskren Chernev

Re: linux-next: Fixes tag needs some work in the drm-msm tree

2020-12-06 Thread Iskren Chernev
On 12/6/20 10:05 PM, Stephen Rothwell wrote: > Hi all, > > In commit > >   9b73bde39cf2 ("drm/msm: Fix use-after-free in msm_gem with carveout") > > Fixes tag > >   Fixes: 4b85f7f5cf7 ("drm/msm: support for an arbitrary number of address spaces") > > has these problem(s): > >   - SHA1 should be

[PATCH 2/2] ARM: dts: qcom: msm8974-lge-nexus5: Add fuel gauge

2020-11-26 Thread Iskren Chernev
The LG Nexus 5 uses a maxim17048 fuelgauge. The maxim,rcomp value is taken from downstream dt. Temperature-based compensation is not yet supported in the mainline driver, but the readings seem fine nevertheless. Signed-off-by: Iskren Chernev Tested-by: Nícolas F. R. A. Prado --- .../qcom

[PATCH 1/2] ARM: dts: qcom: msm8974-klte: Add fuel gauge

2020-11-26 Thread Iskren Chernev
The Samsung Galaxy S5 uses a maxim17048 fuelgauge. The maxim,rcomp value is taken from downstream kernel. Model data and temperature-based compensation are not yet supported in the mainline driver, but the readings seem fine nevertheless. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom

[PATCH v2] drm/msm: Fix use-after-free in msm_gem with carveout

2020-11-26 Thread Iskren Chernev
em_object allocation, and freeing order was therefore overlooked. Fixes: 4b85f7f5cf7 ("drm/msm: support for an arbitrary number of address spaces") Signed-off-by: Iskren Chernev --- v1: https://lkml.org/lkml/2020/11/26/130 Changes in v2: - patch now compiles (oops) - improve commit mes

[PATCH] drm/msm: Fix use-after-free in msm_gem with carveout

2020-11-26 Thread Iskren Chernev
ist, so delaying the deletion should be harmless. This patch splits put_iova in put_iova_spaces and put_iova_vmas, so the vma can be freed after the mm_node has been deallocated with the mm. Signed-off-by: Iskren Chernev --- drivers/gpu/drm/msm/msm_gem.c | 27 ++- 1 file ch

[PATCH] power: supply: ltc2941: Fix ptr to enum cast

2020-10-09 Thread Iskren Chernev
clang complains about casting pointers to smaller enum types. Signed-off-by: Iskren Chernev --- drivers/power/supply/ltc2941-battery-gauge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/power/supply/ltc2941-battery-gauge.c b/drivers/power/supply/ltc2941-battery

[PATCH] power: supply: max17040: Fix ptr to enum cast

2020-10-05 Thread Iskren Chernev
clang complains about casting pointers to smaller enum types. Reported-by: kernel test robot Signed-off-by: Iskren Chernev --- P.S. I fixed a similar issue in v5, but it was in another patch, and the test robot only complains about the first issue, so I missed this one. There is a similar

[PATCH v5 2/7] power: supply: max17040: Use regmap i2c

2020-09-22 Thread Iskren Chernev
Rewrite i2c operations from i2c client read/write to regmap i2c. As a result, most private functions now accept the private driver data instead of an i2c client pointer. Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker --- drivers/power/supply/Kconfig| 1 + drivers/power

[PATCH v5 1/7] power: supply: max17040: Use devm_ to automate remove

2020-09-22 Thread Iskren Chernev
. Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker --- drivers/power/supply/max17040_battery.c | 39 + 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c index

[PATCH v5 4/7] power: supply: max17040: Support compatible devices

2020-09-22 Thread Iskren Chernev
://datasheets.maximintegrated.com/en/ds/MAX17058-MAX17059.pdf Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker Reported-by: kernel test robot --- drivers/power/supply/Kconfig| 10 +- drivers/power/supply/max17040_battery.c | 155 +--- 2 files changed, 143

[PATCH v5 6/7] power: supply: max17040: Support setting rcomp

2020-09-22 Thread Iskren Chernev
not implemented at the moment, because there is no provision for receiving the ambient temperature at the moment. Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker --- drivers/power/supply/max17040_battery.c | 40 + 1 file changed, 40 insertions(+) diff --git a

[PATCH v5 5/7] dt-bindings: power: supply: max17040: Add maxim,rcomp

2020-09-22 Thread Iskren Chernev
To compensate for the battery chemistry and operating conditions the chips support a compensation value. Specify one or two byte compensation via the maxim,rcomp byte array. Signed-off-by: Iskren Chernev Reviewed-by: Rob Herring --- .../devicetree/bindings/power/supply/max17040_battery.txt

[PATCH v5 3/7] dt-bindings: power: supply: Extend max17040 compatibility

2020-09-22 Thread Iskren Chernev
: https://lore.kernel.org/patchwork/patch/1263411/#1468420 Signed-off-by: Iskren Chernev Reviewed-by: Rob Herring --- .../bindings/power/supply/max17040_battery.txt| 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/power

[PATCH v5 7/7] power: supply: max17040: Support soc alert

2020-09-22 Thread Iskren Chernev
max17048 and max17049 support SOC alerts (interrupts when battery capacity changes by +/- 1%). At the moment the driver polls for changes every second. Using the alerts removes the need for polling. Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker --- drivers/power/supply

[PATCH v5 0/7] power: supply: max17040 support compatible devices

2020-09-22 Thread Iskren Chernev
-off-by matching author (was violated for v4 patch 2/7) Iskren Chernev (7): power: supply: max17040: Use devm_ to automate remove power: supply: max17040: Use regmap i2c dt-bindings: power: supply: Extend max17040 compatibility power: supply: max17040: Support compatible devices dt

[PATCH RESEND 6/7] ARM: dts: qcom: msm8974-klte: Add support for wifi

2020-09-20 Thread Iskren Chernev
The Samsung Galaxy S5 (klte), uses a Broadcom 4354 Chip connected on the SDIO bus. The chip also requires a corresponding firmware + txt file[1]. [1] https://gitlab.com/postmarketOS/pmaports/-/blob/master/firmware/firmware-samsung-klte/APKBUILD Signed-off-by: Iskren Chernev --- .../boot/dts

[PATCH RESEND 7/7] ARM: dts: qcom: msm8974-klte: Add support for SD card

2020-09-20 Thread Iskren Chernev
The Samsung Galaxy S5 (klte), has 3 SDHCI nodes used for internal storage, WiFi, external SD card slot. The external SD card slot is similar to the internal storage. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts| 44 ++- 1 file changed, 43

[PATCH RESEND 3/7] ARM: dts: qcom: msm8974-klte: Add support for touchscreen

2020-09-20 Thread Iskren Chernev
Add support for the touchscreen found on the Samsung Galaxy S5. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts| 54 +++ 1 file changed, 54 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom

[PATCH RESEND 4/7] ARM: dts: qcom: msm8974-klte: Add support for led

2020-09-20 Thread Iskren Chernev
The klte uses a Panasonic AN30259A LED controller for it's indicator led. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts| 48 +++ 1 file changed, 48 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boo

[PATCH RESEND 5/7] ARM: dts: qcom: msm8974-klte: Add gpio expander chip

2020-09-20 Thread Iskren Chernev
The Samsung Galaxy S5 has a GPIO Expander chip, the PCAL6416A with 16 ports on a i2c bus. These pins are used for WiFi, NFC, IR among other things. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts| 29 +-- 1 file changed, 27 insertions(+), 2

[PATCH RESEND 1/7] ARM: dts: qcom: msm8974-klte: Merge pinctrl nodes

2020-09-20 Thread Iskren Chernev
commit cd13c72c1853f219e1f ("ARM: dts: qcom: msm8974-klte: Add max77826 pmic node") and commit 8bf7a360a92cc6b2aebc8 ("ARM: dts: qcom: msm8974-klte: Add sdhci1 node") both added pinctrl node. This patch merges the two nodes. Signed-off-by: Iskren Chernev --- .../boot/dts/

[PATCH RESEND 2/7] ARM: dts: qcom: msm8974-klte: Add support for touchkey

2020-09-20 Thread Iskren Chernev
Add support for the touchkey found on the Samsung Galaxy S5. The touchkey is responsible for handling the application and back buttons found around the home button. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts| 44 ++- 1 file changed, 43

[PATCH RESEND 0/7] ARM: dts: qcom: msm8974: klte: Enable some hardware

2020-09-20 Thread Iskren Chernev
https://gitlab.com/postmarketOS/linux-postmarketos/-/commit/765f55b248cd3b231af8431fe2f2aeca263b4e4b [3] https://lkml.org/lkml/2020/6/30/643 Iskren Chernev (7): ARM: dts: qcom: msm8974-klte: Merge pinctrl nodes ARM: dts: qcom: msm8974-klte: Add support for touchkey ARM: dts: qcom: msm8974-klte

[PATCH v4 2/7] power: supply: max17040: Use regmap i2c

2020-09-06 Thread Iskren Chernev
From: Iskren Chernev Rewrite i2c operations from i2c client read/write to regmap i2c. As a result, most private functions now accept the private driver data instead of an i2c client pointer. Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker --- drivers/power/supply/Kconfig

[PATCH v4 1/7] power: supply: max17040: Use devm_ to automate remove

2020-09-06 Thread Iskren Chernev
. Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker --- drivers/power/supply/max17040_battery.c | 39 + 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c index

[PATCH v4 3/7] dt-bindings: power: supply: Extend max17040 compatibility

2020-09-06 Thread Iskren Chernev
: https://lore.kernel.org/patchwork/patch/1263411/#1468420 Signed-off-by: Iskren Chernev Reviewed-by: Rob Herring --- .../bindings/power/supply/max17040_battery.txt| 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/power

[PATCH v4 6/7] power: supply: max17040: Support setting rcomp

2020-09-06 Thread Iskren Chernev
not implemented at the moment, because there is no provision for receiving the ambient temperature at the moment. Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker --- drivers/power/supply/max17040_battery.c | 40 + 1 file changed, 40 insertions(+) diff --git a

[PATCH v4 7/7] power: supply: max17040: Support soc alert

2020-09-06 Thread Iskren Chernev
max17048 and max17049 support SOC alerts (interrupts when battery capacity changes by +/- 1%). At the moment the driver polls for changes every second. Using the alerts removes the need for polling. Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker --- drivers/power/supply

[PATCH v4 4/7] power: supply: max17040: Support compatible devices

2020-09-06 Thread Iskren Chernev
://datasheets.maximintegrated.com/en/ds/MAX17058-MAX17059.pdf Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker --- drivers/power/supply/Kconfig| 10 +- drivers/power/supply/max17040_battery.c | 154 +--- 2 files changed, 142 insertions(+), 22 deletions

[PATCH v4 5/7] dt-bindings: power: supply: max17040: Add maxim,rcomp

2020-09-06 Thread Iskren Chernev
To compensate for the battery chemistry and operating conditions the chips support a compensation value. Specify one or two byte compensation via the maxim,rcomp byte array. Signed-off-by: Iskren Chernev Reviewed-by: Rob Herring --- .../devicetree/bindings/power/supply/max17040_battery.txt

[PATCH v4 0/7] power: supply: max17040 support compatible devices

2020-09-06 Thread Iskren Chernev
From: Iskren Chernev The max17040 fuel gauge is part of a family of 8 chips that have very similar mode of operations and registers. This patch set adds: - compatible strings for all supported devices and handles the minor differences between them; - handling for devices reporting double

Re: [PATCH v3 2/6] dt-bindings: power: supply: Extend max17040 compatibility

2020-07-14 Thread Iskren Chernev
On 7/13/20 10:03 PM, Rob Herring wrote: > On Wed, Jun 24, 2020 at 06:56:29PM +0300, Iskren Chernev wrote: >> Maxim max17040 is a fuel gauge from a larger family utilising the Model >> Gauge technology. Document all different compatible strings that the >> max17040 driver r

Re: [PATCH 0/7] ARM: dts: qcom: msm8974: klte: Enable some hardware

2020-07-01 Thread Iskren Chernev
On 7/1/20 1:30 PM, Brian Masney wrote: > Hi Iskren, > > On Tue, Jun 30, 2020 at 05:09:05PM +0300, Iskren Chernev wrote: >> Enable support for various hw found on the Samsung Galaxy S5: >> - touchkey (the two buttons around the home button) >> - touchscreen >

[PATCH 3/7] ARM: dts: qcom: msm8974-klte: Add support for touchscreen

2020-06-30 Thread Iskren Chernev
Add support for the touchscreen found on the Samsung Galaxy S5. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts| 54 +++ 1 file changed, 54 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom

[PATCH 7/7] ARM: dts: qcom: msm8974-klte: Add support for SD card

2020-06-30 Thread Iskren Chernev
is why CD is disabled and polling is used instead. Related thread [1] [1] https://lore.kernel.org/linux-mmc/491cfef4-4a97-b6e8-0f41-d44e1c73e...@gmail.com/ Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts| 44 ++- 1 file changed, 43 insertions

[PATCH 6/7] ARM: dts: qcom: msm8974-klte: Add support for wifi

2020-06-30 Thread Iskren Chernev
The Samsung Galaxy S5 (klte), uses a Broadcom 4354 Chip connected on the SDIO bus. The chip also requires a corresponding firmware + txt file[1]. [1] https://gitlab.com/postmarketOS/pmaports/-/blob/master/firmware/firmware-samsung-klte/APKBUILD Signed-off-by: Iskren Chernev --- .../boot/dts

[PATCH 5/7] ARM: dts: qcom: msm8974-klte: Add gpio expander chip

2020-06-30 Thread Iskren Chernev
The Samsung Galaxy S5 has a GPIO Expander chip, the PCAL6416A with 16 ports on a i2c bus. These pins are used for WiFi, NFC, IR among other things. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts| 29 +-- 1 file changed, 27 insertions(+), 2

[PATCH 1/7] ARM: dts: qcom: msm8974-klte: Merge pinctrl nodes

2020-06-30 Thread Iskren Chernev
commit cd13c72c1853 ("ARM: dts: qcom: msm8974-klte: Add max77826 pmic node") and commit 8bf7a360a92c ("ARM: dts: qcom: msm8974-klte: Add sdhci1 node") both added pinctrl node. This patch merges the two nodes. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-sams

[PATCH 4/7] ARM: dts: qcom: msm8974-klte: Add support for led

2020-06-30 Thread Iskren Chernev
The klte uses a Panasonic AN30259A LED controller for it's indicator led. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts| 48 +++ 1 file changed, 48 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boo

[PATCH 0/7] ARM: dts: qcom: msm8974: klte: Enable some hardware

2020-06-30 Thread Iskren Chernev
ketos/-/commit/765f55b248cd3b231af8431fe2f2aeca263b4e4b Iskren Chernev (7): ARM: dts: qcom: msm8974-klte: Merge pinctrl nodes ARM: dts: qcom: msm8974-klte: Add support for touchkey ARM: dts: qcom: msm8974-klte: Add support for touchscreen ARM: dts: qcom: msm8974-klte: Add support for led

[PATCH 2/7] ARM: dts: qcom: msm8974-klte: Add support for touchkey

2020-06-30 Thread Iskren Chernev
Add support for the touchkey found on the Samsung Galaxy S5. The touchkey is responsible for handling the application and back buttons found around the home button. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts| 44 ++- 1 file changed, 43

[PATCH v3 5/6] power: supply: max17040: Support setting rcomp

2020-06-24 Thread Iskren Chernev
not implemented, because there is no provision for receiving the ambient temperature. Signed-off-by: Iskren Chernev --- drivers/power/supply/max17040_battery.c | 40 + 1 file changed, 40 insertions(+) diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power

[PATCH v3 4/6] dt-bindings: power: supply: max17040: Add maxim,rcomp

2020-06-24 Thread Iskren Chernev
To compensate for the battery chemistry and operating conditions the chips support a compensation value. Specify one or two byte compensation via the maxim,rcomp byte array. Signed-off-by: Iskren Chernev --- .../devicetree/bindings/power/supply/max17040_battery.txt | 6 ++ 1 file changed

[PATCH v3 3/6] power: supply: max17040: Support compatible devices

2020-06-24 Thread Iskren Chernev
://datasheets.maximintegrated.com/en/ds/MAX17058-MAX17059.pdf Signed-off-by: Iskren Chernev --- drivers/power/supply/Kconfig| 10 +- drivers/power/supply/max17040_battery.c | 143 +--- 2 files changed, 135 insertions(+), 18 deletions(-) diff --git a/drivers/power

[PATCH v3 6/6] power: supply: max17040: Support soc alert

2020-06-24 Thread Iskren Chernev
max17048 and max17049 support SOC alerts (interrupts when battery capacity changes by +/- 1%). At the moment the driver polls for changes every second. Using the alerts removes the need for polling. Signed-off-by: Iskren Chernev --- drivers/power/supply/max17040_battery.c | 82

[PATCH v3 2/6] dt-bindings: power: supply: Extend max17040 compatibility

2020-06-24 Thread Iskren Chernev
-off-by: Iskren Chernev --- .../bindings/power/supply/max17040_battery.txt| 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/power/supply/max17040_battery.txt b/Documentation/devicetree/bindings/power/supply/max17040_battery.txt

[PATCH v3 0/6] power: supply: max17040 support compatible devices

2020-06-24 Thread Iskren Chernev
/en/ds/MAX17058-MAX17059.pdf v2: https://lkml.org/lkml/2020/6/18/260 v1: https://lkml.org/lkml/2020/6/8/682 Changes in v2: - remove maxim,skip-reset property in favor of device id - split driver change into 4 pieces Iskren Chernev (6): power: supply: max17040: Use regmap i2c dt-bindings: power

[PATCH v3 1/6] power: supply: max17040: Use regmap i2c

2020-06-24 Thread Iskren Chernev
Rewrite i2c operations from i2c client read/write to regmap i2c. As a result, most private functions now accept the private driver data instead of an i2c client pointer. Signed-off-by: Iskren Chernev --- drivers/power/supply/Kconfig| 1 + drivers/power/supply/max17040_battery.c

Re: [PATCH v2 1/2] dt-bindings: power: supply: Document max17040 extensions

2020-06-20 Thread Iskren Chernev
On 6/20/20 12:31 AM, Sebastian Reichel wrote: > Hi, > > On Fri, Jun 19, 2020 at 10:57:19PM +0300, Iskren Chernev wrote: >> On 6/19/20 6:59 PM, Sebastian Reichel wrote: >>> On Thu, Jun 18, 2020 at 01:13:39PM +0300, Iskren Chernev wrote: >>>> Maxim max17040

Re: [PATCH v2 2/2] power: supply: max17040: Support compatible devices

2020-06-19 Thread Iskren Chernev
On 6/19/20 7:13 PM, Sebastian Reichel wrote: > Hi, > > On Thu, Jun 18, 2020 at 01:13:40PM +0300, Iskren Chernev wrote: >> The max17040 fuel gauge is part of a family of 8 chips that have very >> similar mode of operations and registers. >> >> This change adds

Re: [PATCH v2 1/2] dt-bindings: power: supply: Document max17040 extensions

2020-06-19 Thread Iskren Chernev
On 6/19/20 6:59 PM, Sebastian Reichel wrote: > Hi, > > On Thu, Jun 18, 2020 at 01:13:39PM +0300, Iskren Chernev wrote: >> Maxim max17040 is a fuel gauge from a larger family utilising the Model >> Gauge technology. Document all different compatible strings that the >>

[PATCH v2 2/2] power: supply: max17040: Support compatible devices

2020-06-18 Thread Iskren Chernev
-MAX17059.pdf Signed-off-by: Iskren Chernev --- v1: https://lkml.org/lkml/2020/6/8/683 changes in v2: - make max17040_family static - fix rcomp len check - implement maxim,skip-reset - reword Kconfig text drivers/power/supply/Kconfig| 11 +- drivers/power/supply/max17040_battery.c | 466

[PATCH v2 1/2] dt-bindings: power: supply: Document max17040 extensions

2020-06-18 Thread Iskren Chernev
device reset might lead to very inaccurate readings. Specify maxim,skip-reset to avoid that. To compensate for the battery chemistry and operating conditions the chips support a compensation value. Specify one or two byte compensation via the maxim,rcomp byte array. Signed-off-by: Iskren Chernev

[PATCH 2/2] power: supply: max17040: Support compatible devices

2020-06-08 Thread Iskren Chernev
-MAX17059.pdf Signed-off-by: Iskren Chernev --- drivers/power/supply/Kconfig| 11 +- drivers/power/supply/max17040_battery.c | 458 +--- 2 files changed, 330 insertions(+), 139 deletions(-) diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig index

[PATCH 1/2] dt-bindints: power: supply: Document max17040 extensions

2020-06-08 Thread Iskren Chernev
compensate for the battery chemistry and operating conditions the chips support a compensation value. Specify one or two byte compensation via the maxim,rcomp byte array. Signed-off-by: Iskren Chernev --- .../power/supply/max17040_battery.txt | 22 ++- 1 file changed, 21