[PATCH 01/10] ASoC: fsl_sai: add of_match data

2019-07-22 Thread Daniel Baluta
From: Lucas Stach New revisions of the SAI IP block have even more differences that need be taken into account by the driver. To avoid sprinking compatible checks all over the driver move the current differences into of_match_data. Signed-off-by: Lucas Stach --- sound/soc/fsl/fsl_sai.c | 22 ++

[PATCH 00/10] Add support for new SAI IP version

2019-07-22 Thread Daniel Baluta
ister address space. Patch 10 enable SAI for imx7ulp and imx8mq. This patch introduces Daniel Baluta (8): ASoC: fsl_sai: Add registers definition for multiple datalines ASoC: fsl_sai: Update Tx/Rx channel enable mask ASoC: fsl_sai: Add support to enable multiple data lines ASoC: dt-bindings: Doc

[PATCH 03/10] ASoC: fsl_sai: Add registers definition for multiple datalines

2019-07-22 Thread Daniel Baluta
, Receive data register * RFR0..7, Receive FIFO register Signed-off-by: Daniel Baluta --- sound/soc/fsl/fsl_sai.c | 76 +++-- sound/soc/fsl/fsl_sai.h | 36 --- 2 files changed, 98 insertions(+), 14 deletions(-) diff --git a/sound/soc/fsl

[PATCH 10/10] ASoC: fsl_sai: Add support for imx7ulp/imx8mq

2019-07-22 Thread Daniel Baluta
SAI module on imx7ulp/imx8m features 2 new registers (VERID and PARAM) at the beginning of register address space. On imx7ulp FIFOs can held up to 16 x 32 bit samples. On imx8mq FIFOs can held up to 128 x 32 bit samples. Signed-off-by: Daniel Baluta --- sound/soc/fsl/fsl_sai.c | 14

[PATCH 08/10] ASoC: dt-bindings: Document fcomb_mode property

2019-07-22 Thread Daniel Baluta
This allows combining multiple-data-line FIFOs into a single-data-line FIFO. Signed-off-by: Daniel Baluta --- Documentation/devicetree/bindings/sound/fsl-sai.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation

[PATCH 07/10] ASoC: fsl_sai: Add support for FIFO combine mode

2019-07-22 Thread Daniel Baluta
mode is read from fsl,fcomb-mode DT property. By default, if no property is specified fifo combine mode is disabled. [1]https://cache.nxp.com/secured/assets/documents/en/reference-manual/IMX8MDQLQRM.pdf?__gda__=1563728701_38bea7f0f726472cc675cb141b91bec7&fileExt=.pdf Signed-off-by: Daniel Ba

[PATCH 09/10] ASoC: fsl_sai: Add support for SAI new version

2019-07-22 Thread Daniel Baluta
each board private data. [1]https://cache.nxp.com/secured/assets/documents/en/reference-manual/IMX8MDQLQRM.pdf?__gda__=1563728701_38bea7f0f726472cc675cb141b91bec7&fileExt=.pdf Signed-off-by: Daniel Baluta --- sound/soc/fsl/fsl_sai.c | 240 +++- sound/soc

[PATCH 02/10] ASoC: fsl_sai: derive TX FIFO watermark from FIFO depth

2019-07-22 Thread Daniel Baluta
From: Lucas Stach The DMA request schould be triggered as soon as the FIFO has space for another burst. As different versions of the SAI block have different FIFO sizes, the watrmark level needs to be derived from version specific data. Signed-off-by: Lucas Stach --- sound/soc/fsl/fsl_sai.c |

[PATCH 06/10] ASoC: dt-bindings: Document dl_mask property

2019-07-22 Thread Daniel Baluta
SAI supports up to 8 data lines. This property let the user configure how many data lines should be used per transfer direction (Tx/Rx). Signed-off-by: Daniel Baluta --- Documentation/devicetree/bindings/sound/fsl-sai.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation

[PATCH 05/10] ASoC: fsl_sai: Add support to enable multiple data lines

2019-07-22 Thread Daniel Baluta
data line #0. Signed-off-by: Daniel Baluta --- sound/soc/fsl/fsl_sai.c | 10 +- sound/soc/fsl/fsl_sai.h | 6 -- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 768341608695..d0fa02188b7c 100644 --- a/sound/soc

[PATCH 04/10] ASoC: fsl_sai: Update Tx/Rx channel enable mask

2019-07-22 Thread Daniel Baluta
Tx channel enable (TCE) / Rx channel enable (RCE) bits enable corresponding data channel for Tx/Rx operation. Because SAI supports up the 8 channels TCE/RCE occupy up the 8 bits inside TCR3/RCR3 registers we need to extend the mask to reflect this. Signed-off-by: Daniel Baluta --- sound/soc

Re: [PATCH v2 1/2] firmware: imx: Add DSP IPC protocol interface

2019-07-08 Thread Daniel Baluta
Hi Oleksij, Any comments on this? On Thu, Jun 27, 2019 at 11:14 AM Daniel Baluta wrote: > > Some of i.MX8 processors (e.g i.MX8QM, i.MX8QXP) contain > the Tensilica HiFi4 DSP for advanced pre- and post-audio > processing. > > The communication between Host CPU and DSP fi

Re: [PATCHv2] clk: add imx8 clk defines

2019-07-11 Thread Daniel Baluta
On Thu, Jul 11, 2019 at 12:19 PM Oliver Graute wrote: > > On 11/07/19, Abel Vesa wrote: > > On 19-06-19 09:39:52, Oliver Graute wrote: > > > From: Oliver Graute > > > > > > added header defines for imx8qm clock > > > > > > Signed-off-by: Oliver Graute > > > > Again, this seems to be taken from s

[PATCH] ASoC: fsl: sai: Reduce underrun when stream starts

2019-03-08 Thread Daniel Baluta
From: Shengjiu Wang Write initial words into SAI FIFO to reduce the underrun error. Signed-off-by: Shengjiu Wang Signed-off-by: Daniel Baluta --- sound/soc/fsl/fsl_sai.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index

Re: [PATCH] ASoC: fsl: sai: Reduce underrun when stream starts

2019-03-08 Thread Daniel Baluta
On Fri, Mar 8, 2019 at 6:16 PM Fabio Estevam wrote: > > Hi Daniel, > > On Fri, Mar 8, 2019 at 1:09 PM Daniel Baluta wrote: > > > > From: Shengjiu Wang > > > > Write initial words into SAI FIFO to reduce the underrun > > error. > > Please provi

[PATCH v2] ASoC: fsl: sai: Fix underrrun for playback stream start

2019-03-08 Thread Daniel Baluta
uot; [1] https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf Signed-off-by: Shengjiu Wang Signed-off-by: Daniel Baluta --- Changes since v1: - as per Fabio's request clarify the issue and the solution - move words writing before enabling DMA request sound/soc/fsl/fsl_sai.c | 7 +++

Re: [PATCH v2] ASoC: fsl: sai: Fix underrrun for playback stream start

2019-03-11 Thread Daniel Baluta
On Fri, Mar 8, 2019 at 10:59 PM Nicolin Chen wrote: > > On Fri, Mar 08, 2019 at 05:39:30PM +, Daniel Baluta wrote: > > > @@ -542,6 +544,11 @@ static int fsl_sai_trigger(struct snd_pcm_substream > > *substream, int cmd, > > case SNDRV_PCM_TR

Re: [PATCH 2/3] arm64: dts: fsl: Build the Librem5 devkit devicetree

2019-03-11 Thread Daniel Baluta
On Tue, Mar 12, 2019 at 1:48 AM Angus Ainslie (Purism) wrote: > > Compile the Librem5 devkit device tree > > Signed-off-by: Angus Ainslie (Purism) > --- > arch/arm64/boot/dts/freescale/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/boot/dts/freescale/Makefile > b/a

Re: [PATCH 3/3] arm64: librem5-devkit: Add defconfig for the Librem5 devkit

2019-03-11 Thread Daniel Baluta
On Tue, Mar 12, 2019 at 1:47 AM Angus Ainslie (Purism) wrote: > > Signed-off-by: Angus Ainslie (Purism) Hi Angus, My impression was that for arm64 world there will be only one defconfig. So, I'm not sure if this patch would be acceptable. thanks, Daniel. > --- > arch/arm64/configs/librem5-devk

Re: [PATCH 3/3] imx8mq.dtsi: add the sdma nodes

2019-02-22 Thread Daniel Baluta
Hi Angus, What is the status of this patch? Most likely this should go through Shwan's tree. I noticed that I have also sent a similar patch to Shawn: https://www.spinics.net/lists/arm-kernel/msg708424.html So, lets coordinate and work better on this. I am now preparing another series where I a

[PATCH 4/5] arm64: dts: imx8qm: Enable SAI2 for wm8524 codec

2019-02-25 Thread Daniel Baluta
This enables SAI2 digital audio interface to be used with wm8524 codec. wm8524 works only in slave mode, so we make sure that IMX8MQ_CLK_SAI2 has an appropriate frequency in order to easily derive rates divisible with 8000. Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mq

[PATCH 3/5] arm64: dts: imx8qm: Add SAI pinctrl configuration

2019-02-25 Thread Daniel Baluta
This sets the pin configuration for SAI pins BLCK/MCLK/FSYNC/DATA. GPIO_01 is used for mute. Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64

[PATCH 1/5] arm64: dts: imx8mq: Add SDMA nodes

2019-02-25 Thread Daniel Baluta
SDMA1 is part of AIPS-3 region and SDMA2 is part of AIPS-1 region. Signed-off-by: Anson Huang [initial submit in i.MX internal tree] Signed-off-by: Daniel Baluta [adaptation for linux-next] --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 22 ++ 1 file changed, 22 insertions

[PATCH 2/5] arm64: dts: imx8mq: Add SAI2 node

2019-02-25 Thread Daniel Baluta
SAI2 is part of AIPS-3 memory region and it's the DAI through which the wm8524 codec gets its data. Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b

[PATCH 5/5] arm64: dts: imx8qm: Enable wm8524 codec

2019-02-25 Thread Daniel Baluta
This uses simple-audio-card machine driver adding 1 CPU DAI and 1 Codec DAI. Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 29 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot

Re: [PATCH 1/5] arm64: dts: imx8mq: Add SDMA nodes

2019-02-25 Thread Daniel Baluta
Please ignore this, I sent it from the wrong repo. I swear that I double checked. Will sent v2 with correct base. On Mon, 2019-02-25 at 13:17 +, Daniel Baluta wrote: > SDMA1 is part of AIPS-3 region and SDMA2 is part > of AIPS-1 region. > > Signed-off-by: Anson Huang > [in

[PATCH 1/5 v2] arm64: dts: imx8mq: Add SDMA nodes

2019-02-25 Thread Daniel Baluta
SDMA1 is part of AIPS-3 region and SDMA2 is part of AIPS-1 region. Signed-off-by: Anson Huang [initial submit in i.MX internal tree] Signed-off-by: Daniel Baluta [adaptation for linux-next] --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 22 ++ 1 file changed, 22 insertions

[PATCH 0/5 v2] Enable wm8524 on i.MX8MQ

2019-02-25 Thread Daniel Baluta
ce v1: - added cover letter - remove "fsl,imx8mq-sdma" compatible for sdma. Daniel Baluta (5): arm64: dts: imx8mq: Add SDMA nodes arm64: dts: imx8mq: Add SAI2 node arm64: dts: imx8qm: Add SAI pinctrl configuration arm64: dts: imx8qm: Enable SAI2 for wm8524 cod

[PATCH 3/5 v2] arm64: dts: imx8qm: Add SAI pinctrl configuration

2019-02-25 Thread Daniel Baluta
This sets the pin configuration for SAI pins BLCK/MCLK/FSYNC/DATA. GPIO_01 is used for mute. Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64

[PATCH 5/5 v2] arm64: dts: imx8qm: Enable wm8524 codec

2019-02-25 Thread Daniel Baluta
This uses simple-audio-card machine driver adding 1 CPU DAI and 1 Codec DAI. Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 29 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot

[PATCH 2/5 v2] arm64: dts: imx8mq: Add SAI2 node

2019-02-25 Thread Daniel Baluta
SAI2 is part of AIPS-3 memory region and it's the DAI through which the wm8524 codec gets its data. Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b

[PATCH 4/5 v2] arm64: dts: imx8qm: Enable SAI2 for wm8524 codec

2019-02-25 Thread Daniel Baluta
This enables SAI2 digital audio interface to be used with wm8524 codec. wm8524 works only in slave mode, so we make sure that IMX8MQ_CLK_SAI2 has an appropriate frequency in order to easily derive rates divisible with 8000. Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mq

Re: [PATCH v6 2/3] dmaengine: imx-sdma: add a test for imx8mq multi sdma devices

2019-02-25 Thread Daniel Baluta
e > SAI only work with sdma2 not sdma1. To make sure the sdma channel is from > the correct sdma device, use the node pointer to match. > > Signed-off-by: Angus Ainslie (Purism) > Reviewed-by: Lucas Stach Thanks Angus for the patch! Tested-by: Daniel Baluta > --- > dri

[PATCH] ASoC: simple-card: Fix refcount underflow

2019-02-16 Thread Daniel Baluta
rsion posted by Kuninori Morimoto and commit message includes explanations from Mark Brown. https://patchwork.kernel.org/patch/10814255/ Reported-by: Vicente Bergas Signed-off-by: Daniel Baluta --- sound/soc/generic/simple-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

Re: [PATCH] ASoC: simple-card: Fix refcount underflow

2019-02-17 Thread Daniel Baluta
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.kernel.org%2Fpatch%2F10814255%2F&data=02%7C01%7Cdaniel.baluta%40nxp.com%7Ced1b7adc66a546c1bb4608d69541aaf8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636860506617983174&sdata=hTsurDLdtLAtTw0a5v%2FrSsleSawAP2yiVPl87%2BHCzTI%

Re: [alsa-devel] [PATCH] ASoC: simple-card: Fix refcount underflow

2019-02-18 Thread Daniel Baluta
On Mon, Feb 18, 2019 at 7:50 PM Mark Brown wrote: > > On Mon, Feb 18, 2019 at 08:52:26AM +0100, Takashi Iwai wrote: > > Daniel Baluta wrote: > > > > > Fixes: commit da215354eb55c ("ASoC: simple-card: merge simple-scu- > > > > card") > >

Re: [RFC 05/19] clk: imx: clk-busy: Switch to clk_hw based API

2019-03-23 Thread Daniel Baluta
On Fri, Mar 22, 2019 at 5:39 PM Abel Vesa wrote: > > Switch all the clk_busy clock registering functions > to clk_hw based API. > Hi Abel, The commit message should explain why such a change is needed. thanks, Daniel. > Signed-off-by: Abel Vesa > --- > drivers/clk/imx/clk-busy.c | 30

Re: [PATCH 1/2] pinctrl: pinctrl-imx: Add suspend/resume for LPSR

2019-03-25 Thread Daniel Baluta
On Mon, Mar 25, 2019 at 3:49 PM Abel Vesa wrote: > > From: Robin Gong Please fix Robin's email.

Re: [PATCH v4 5/5] arm64: dts: imx8mq-evk: Enable wm8524 codec

2019-03-08 Thread Daniel Baluta
On Fri, Mar 8, 2019 at 12:32 PM Fabio Estevam wrote: > > Hi Daniel, > > On Fri, Mar 1, 2019 at 12:53 PM Daniel Baluta wrote: > > > They are used by simple-card.c machine driver. > > > > asoc_simple_card_parse_clk > > -> /* Parse dai->

[PATCH v6 2/4] bindings: fsl-imx-sdma: Document fsl,imx8mq-sdma compatbile string

2019-03-08 Thread Daniel Baluta
Add imx8mq sdma support. Reviewed-by: Rob Herring Signed-off-by: Daniel Baluta --- Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx

[PATCH v6 1/4] arm64: dts: imx8mq: Add SDMA nodes

2019-03-08 Thread Daniel Baluta
SDMA1 is part of AIPS-3 region and SDMA2 is part of AIPS-1 region. Reviewed-by: Fabio Estevam Signed-off-by: Anson Huang [initial submit in i.MX internal tree] Signed-off-by: Daniel Baluta [adaptation for linux-next] --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 22 ++ 1

[PATCH v6 0/4] Enable wm8524 on i.MX8MQ-EVK

2019-03-08 Thread Daniel Baluta
tbile string Changes since v2: - s/QM/MQ after Chris comments Changes since v1: - added cover letter - remove "fsl,imx8mq-sdma" compatible for sdma. Daniel Baluta (4): arm64: dts: imx8mq: Add SDMA nodes bindings: fsl-imx-sdma: Document fsl,imx8mq-sdma compatbi

[PATCH v6 4/4] arm64: dts: imx8mq-evk: Enable audio codec wm8952

2019-03-08 Thread Daniel Baluta
-card machine driver to connect them into a sound card. Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 46 1 file changed, 46 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts

[PATCH v6 3/4] arm64: dts: imx8mq: Add SAI2 node

2019-03-08 Thread Daniel Baluta
SAI2 is part of AIPS-3 memory region. Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi index 9d48450453fb

[PATCH] dma: imx-sdma: pass ->dev to dma_alloc_coherent() API

2019-01-11 Thread Daniel Baluta
From: Andy Duan Pass ->dev to dma_alloc_coherent() API. We need this becase dma_alloc_coherent() makes use of dev parameter and receiving NULL will result in a crash. Signed-off-by: Andy Duan Signed-off-by: Daniel Baluta --- drivers/dma/imx-sdma.c | 15 --- 1 file changed

Re: kernel 4.10-rcx iio helper question

2017-01-31 Thread Daniel Baluta
On Tue, Jan 31, 2017 at 8:19 PM, Ken.Lin wrote: > Hi, > > I find the latest kernel introduces new iio sys attributes. > https://patchwork.kernel.org/patch/9391771/ > https://patchwork.kernel.org/patch/9391259/ > > Is there anyone has some ideas about how the new iio sys attribute - > in_pressure_

Re: kernel 4.10-rcx iio helper question

2017-02-01 Thread Daniel Baluta
Could you paste your drivers/iio/pressure/mpl3115.c code into pastebin.com and send us the result? thanks, Daniel. On Wed, Feb 1, 2017 at 8:50 AM, Jonathan Cameron wrote: > > > On 1 February 2017 00:42:31 GMT+00:00, "Ken.Lin" > wrote: >> >> >>> -Original Message- >>> From: Peter Rosin

[PATCH] ASoC: Drop unnecessary debugfs ifdef

2017-02-01 Thread Daniel Baluta
This is a relict of 6553bf06a369 ("ASoC: Don't try to register debugfs entries if the parent does not exist"). Signed-off-by: Daniel Baluta --- sound/soc/soc-core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 9b589d6.

Re: [PATCH 1/1] iio: fix config watermark initial value

2016-06-16 Thread Daniel Baluta
On Mon, Mar 28, 2016 at 1:02 PM, Jonathan Cameron wrote: > On 24/03/16 09:23, Lars-Peter Clausen wrote: >> On 03/24/2016 10:09 AM, Irina Tirdea wrote: >>> config structure is set to 0 when updating the buffers, so by >>> default config->watermark will be 0. When computing the minimum >>> between c

Re: [PATCH] Dyna-Image AL3320A update, add AL3010 driver

2016-06-03 Thread Daniel Baluta
ata *data) > +{ > + int ret; > + long ret64; > + > + ret = al3320a_get_adc_value(data); > + ret64 = ret; > + ret64 = (ret64 * 32000) / 100; > + ret = ret64; > + > + return ret; > +} > + > +static ssize_t al3320a_lux_show(st

Re: [alsa-devel] [PATCH v2 2/2] ASoC: codec: wm8960: Relax bit clock computation

2017-03-21 Thread Daniel Baluta
On Tue, Mar 21, 2017 at 2:52 PM, Charles Keepax wrote: > On Tue, Mar 21, 2017 at 12:09:36PM +0200, Daniel Baluta wrote: >> WM8960 derives bit clock from sysclock using BCLKDIV[3:0] of R8 >> clocking register (See WM8960 datasheet, page 71). >> >> There are use cases, l

Re: [alsa-devel] [PATCH v2 2/2] ASoC: codec: wm8960: Relax bit clock computation

2017-03-21 Thread Daniel Baluta
On Tue, Mar 21, 2017 at 4:20 PM, Charles Keepax wrote: > On Tue, Mar 21, 2017 at 04:05:15PM +0200, Daniel Baluta wrote: >> On Tue, Mar 21, 2017 at 2:52 PM, Charles Keepax >> wrote: >> > On Tue, Mar 21, 2017 at 12:09:36PM +0200, Daniel Baluta wrote: >> >> WM

[PATCH v3 0/2] wm8960: Relax bit clock computation

2017-03-21 Thread Daniel Baluta
couldn't be derived from sysclk it chooses the smalles available bitclk greater than the desired bitclk. Changes since v2: * do not differentiate between relaxed and exact match Changes since v1: * dropped the RFC tag * comments in each individual patch Daniel Baluta (2):

[PATCH v3 1/2] ASoC: codec: wm8960: Refactor sysclk freq search

2017-03-21 Thread Daniel Baluta
Add a separate function for finding (sysclk, lrclk, bclk) when the clock is auto or mclk. This makes code easier to read and reduces the indentation level in wm8960_configure_clocking. Signed-off-by: Daniel Baluta Acked-by: Charles Keepax --- Changes since v2: * none sound/soc/codecs

[PATCH v3 2/2] ASoC: codec: wm8960: Relax bit clock computation

2017-03-21 Thread Daniel Baluta
driver fails to configure clocking and aplay fails to run. Fix this by relaxing bitclk computation, so that when no exact value can be derived from sysclk pick the closest value greater than expected bitclk. Suggested-by: Charles Keepax Signed-off-by: Daniel Baluta --- Changes since v2

[PATCH] ASoC: WM8962: Let codec driver enable/disable its MCLK

2017-03-23 Thread Daniel Baluta
Chen Signed-off-by: Daniel Baluta --- sound/soc/fsl/imx-wm8962.c | 40 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/sound/soc/fsl/imx-wm8962.c b/sound/soc/fsl/imx-wm8962.c index 1b60958..3d894d9 100644 --- a/sound/soc/fsl/imx-wm8962.c +++ b/

[PATCH v2 1/2] ASoC: codec: wm8960: Refactor sysclk freq search

2017-03-21 Thread Daniel Baluta
Add a separate function for finding (sysclk, lrclk, bclk) when the clock is auto or mclk. This makes code easier to read and reduces the indentation level in wm8960_configure_clocking. Signed-off-by: Daniel Baluta --- Changes since v1: * made wm8960_configure_sysclk static

[PATCH v2 2/2] ASoC: codec: wm8960: Relax bit clock computation

2017-03-21 Thread Daniel Baluta
driver fails to configure clocking and aplay fails to run. Fix this by relaxing bitclk computation, so that when no exact value can be derived from sysclk pick the closest value greater than expected bitclk. Suggested-by: Charles Keepax Signed-off-by: Daniel Baluta --- Changes since v1

[PATCH v2 0/2] wm8960: Relax bit clock computation

2017-03-21 Thread Daniel Baluta
couldn't be derived from sysclk it chooses the smalles available bitclk greater than the desired bitclk. Changes since v1: * dropped the RFC tag * comments in each individual patch Daniel Baluta (2): ASoC: codec: wm8960: Refactor sysclk freq search ASoC: codec: wm8960:

Re: [PATCH] ASoC: WM8962: Let codec driver enable/disable its MCLK

2017-03-24 Thread Daniel Baluta
On Fri, Mar 24, 2017 at 6:58 AM, Nicolin Chen wrote: > On Thu, Mar 23, 2017 at 02:01:50PM +0200, Daniel Baluta wrote: >> From: Nicolin Chen >> >> WM8962 needs its MCLK when powerup in wm8962_resume(). Thus it's better >> to control the MCLK in codec driver.

[PATCH v2] ASoC: imx-wm8960: Let codec driver enable/disable its MCLK

2017-03-24 Thread Daniel Baluta
From: Daniel Baluta WM8962 needs its MCLK when powerup in wm8962_resume(). Thus it's better to control the MCLK in codec driver. Thus remove the clock enable in machine driver accordingly. While at it, get rid of imx_wm8962_remove function since it is now empty. Signed-off-by: Daniel B

Re: [RFC PATCH] ASoC: wm8960: Use physical width for bclk

2017-03-15 Thread Daniel Baluta
On Mi, 2017-03-15 at 09:19 +, Charles Keepax wrote: > On Tue, Mar 14, 2017 at 06:57:02PM +0200, Daniel Baluta wrote: > > > > bclk is derived from sysclk with the help of bclk_divs. Anyhow, for > > S20_3LE format there is no bclk_divs that could be used to derive > >

Re: [alsa-devel] [RFC PATCH] ASoC: wm8960: Use physical width for bclk

2017-03-15 Thread Daniel Baluta
On Wed, Mar 15, 2017 at 3:33 PM, Mark Brown wrote: > On Wed, Mar 15, 2017 at 09:19:01AM +, Charles Keepax wrote: >> On Tue, Mar 14, 2017 at 06:57:02PM +0200, Daniel Baluta wrote: > >> > - wm8960->bclk = snd_soc_params_to_bclk(params); >> > + wm8960->

[RFC PATCH 0/2] wm8960: Relax bit clock computation

2017-03-15 Thread Daniel Baluta
width for bclk" discussion archived here: http://mailman.alsa-project.org/pipermail/alsa-devel/2017-March/118735.html Daniel Baluta (2): ASoC: codec: wm8960: Refactor sysclk freq search ASoC: codec: wm8960: Relax bit clock computation sound/soc/codecs

[RFC PATCH 1/2] ASoC: codec: wm8960: Refactor sysclk freq search

2017-03-15 Thread Daniel Baluta
Add a separate function for finding (sysclk, lrclk, bclk) when the clock is auto or mclk. This makes code easier to read and reduces the indentation level in wm8960_configure_clocking. Signed-off-by: Daniel Baluta --- sound/soc/codecs/wm8960.c | 82

[RFC PATCH 2/2] ASoC: codec: wm8960: Relax bit clock computation

2017-03-15 Thread Daniel Baluta
driver fails to configure clocking and aplay fails to run. Fix this by relaxing bitclk computation, so that when no exact value can be derived from sysclk pick the closest value greater than expected bitclk. Suggested-by: Charles Keepax Signed-off-by: Daniel Baluta --- sound/soc/codecs/wm8960.c

Re: [alsa-devel] [RFC PATCH 1/2] ASoC: codec: wm8960: Refactor sysclk freq search

2017-03-16 Thread Daniel Baluta
On Wed, Mar 15, 2017 at 6:22 PM, Charles Keepax wrote: > On Wed, Mar 15, 2017 at 05:33:05PM +0200, Daniel Baluta wrote: >> Add a separate function for finding (sysclk, lrclk, bclk) >> when the clock is auto or mclk. This makes code easier to >> read and reduces the

Re: [alsa-devel] [RFC PATCH 2/2] ASoC: codec: wm8960: Relax bit clock computation

2017-03-16 Thread Daniel Baluta
On Wed, Mar 15, 2017 at 7:17 PM, Charles Keepax wrote: > On Wed, Mar 15, 2017 at 05:33:06PM +0200, Daniel Baluta wrote: >> WM8960 derives bit clock from sysclock using BCLKDIV[3:0] of R8 >> clocking register (See WM8960 datasheet, page 71). >> >> There are use cases, l

[RFC PATCH] ASoC: wm8960: Use physical width for bclk

2017-03-14 Thread Daniel Baluta
encoded files at the cost of some unused BCLK cycles for S20_3LE and S24_LE. Signed-off-by: Daniel Baluta --- sound/soc/codecs/wm8960.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index e1429e3..18ca5fc 100644 --- a

Re: [PATCH v3 1/8] iio:core: add a callback to allow drivers to provide _available attributes

2016-11-07 Thread Daniel Baluta
On Mon, Oct 24, 2016 at 1:39 AM, Peter Rosin wrote: > From: Jonathan Cameron > > A large number of attributes can only take a limited range of values. > Currently in IIO this is handled by directly registering additional > *_available attributes thus providing this information to userspace. > > I

Re: [PATCH v3 1/8] iio:core: add a callback to allow drivers to provide _available attributes

2016-11-07 Thread Daniel Baluta
On Mon, Nov 7, 2016 at 1:57 PM, Peter Rosin wrote: > On 2016-11-07 12:37, Daniel Baluta wrote: >> On Mon, Oct 24, 2016 at 1:39 AM, Peter Rosin wrote: >>> From: Jonathan Cameron >>> >>> A large number of attributes can only take a limited range of values. >

Re: [RFC 0/4] iio: trigger: Add OF support and GPIO based trigger

2017-02-17 Thread Daniel Baluta
On Fri, Feb 17, 2017 at 6:03 PM, Fabrice Gasnier wrote: > Hi, > > I send this as an RFC, as I'm digging to try to get as generic > as possible GPIO based trigger support, as discussed earlier in > other patchset "Add EXTI GPIO trigger support to STM32 ADC": > https://www.spinics.net/lists/arm-kern

Re: [PATCH 3/3] iio: mma8452: update Freescale company information

2016-06-06 Thread Daniel Baluta
On Fri, Jun 3, 2016 at 3:51 PM, Martin Kepplinger wrote: > NXP took over Freescale, so add NXP to the driver descriptions > Is it worth to bother with these kind of changes? The part number still remains the same. We can add a new copyright notice from the new company and that's all. Daniel. >

Re: [PATCH] iio: inv_mpu6050: Fix use-after-free in ACPI code

2016-06-06 Thread Daniel Baluta
rd Looks good to me. I had to look into the code to see that cpm is an alias for buffer.pointer, perhaps this should have been mentioned in the commit message. Acked-by: Daniel Baluta > --- > drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 de

Re: [PATCH 2/2] isdn: hisax: isac: fixed code style issues.

2016-03-13 Thread Daniel Baluta
On Sun, Mar 13, 2016 at 9:21 PM, Cosmin-Gabriel Samoila wrote: > Fixed errors and warnings reported by checkpatch.pl. > Use indicative mood in your commit message. So, s/Fixed/Fix. http://chris.beams.io/posts/git-commit/ > Signed-off-by: Cosmin-Gabriel Samoila > --- > drivers/isdn/hisax/isac

Re: [RFC PATCH 0/9] iio: Fix ABBA deadlock in inv-mpu6050

2016-03-04 Thread Daniel Baluta
On Fri, Mar 4, 2016 at 1:09 AM, Peter Rosin wrote: > From: Peter Rosin > > Hi Daniel, > > Daniel Baluta wrote: >>On Mon, Feb 22, 2016 at 1:17 AM, Wolfram Sang wrote: >>> On Thu, Feb 18, 2016 at 05:53:05PM +0200, Daniel Baluta wrote: >>>> Sending this as

Re: [PATCH] iio: max5487: Add support for Maxim digital potentiometers

2016-03-24 Thread Daniel Baluta
On Thu, Mar 24, 2016 at 1:21 PM, Cristina Moraru wrote: > Add implementation for Maxim MAX5487, MAX5488, MAX5489 > digital potentiometers. Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX5487-MAX5489.pdf > > Signed-off-by: Cristina Moraru > CC: Daniel Baluta Tested-by: Daniel Baluta

Re: [PATCH v2 3/3] iio: hmc5843: Move hmc5843 out of staging

2016-02-22 Thread Daniel Baluta
x27;Industrial I/O support -> >> Magnetometer sensors' menu. >> >> Signed-off-by: Cristina Moraru >> Cc: Daniel Baluta > For some reason I couldn't immediately identify this patch wouldn't > apply to my tree. I hand applied it and all seemed fine, but pl

Re: [RFC PATCH 0/9] iio: Fix ABBA deadlock in inv-mpu6050

2016-02-22 Thread Daniel Baluta
On Mon, Feb 22, 2016 at 1:17 AM, Wolfram Sang wrote: > On Thu, Feb 18, 2016 at 05:53:05PM +0200, Daniel Baluta wrote: >> Sending this as an RFC because I don't know if style fixes are appropriate >> for this driver and also not sure if deadlock fix is the best solution. >

[PATCH v5] iio: adc: Add TI ADS1015 ADC driver support

2016-02-11 Thread Daniel Baluta
The driver has sysfs readings with runtime PM support for power saving. It also offers buffer support that can be used together with IIO software triggers. Datasheet can be found here: http://www.ti.com.cn/cn/lit/ds/symlink/ads1015.pdf Signed-off-by: Daniel Baluta --- Changes since v4

Re: extending /sys/.../iio:deviceX/in_accelX_power_mode

2016-03-01 Thread Daniel Baluta
On Tue, Mar 1, 2016 at 10:59 AM, Martin Kepplinger wrote: > Would it be ok, if adding in_accelX_power_mode to a driver, to extend it > so that in_accel_power_mode_available offers: > > low_noise low_power low_power_low_noise normal > > if there's a default "normal" mode, plus options to increase o

Re: [PATCH v4] iio: adc: Add TI ADS1015 ADC driver support

2016-03-01 Thread Daniel Baluta
On Tue, Mar 1, 2016 at 4:42 AM, Michael Welling wrote: > On Mon, Feb 29, 2016 at 10:09:10PM -0300, Lucas De Marchi wrote: >> On Mon, Feb 29, 2016 at 9:50 PM, Michael Welling wrote: >> > On Fri, Feb 05, 2016 at 03:17:18PM +0200, Daniel Baluta wrote: >> >> The

Re: [RFC PATCH 8/9] i2c: i2c-mux: Allow for NULL select callback

2016-03-01 Thread Daniel Baluta
On Tue, Mar 1, 2016 at 10:30 PM, Wolfram Sang wrote: > On Thu, Feb 18, 2016 at 05:53:13PM +0200, Daniel Baluta wrote: >> From: Adriana Reus >> >> Add a check in i2c_mux_master_xfer before calling the select callback. >> This is necessary so that NULL callbac

Re: [RFC PATCH 9/9] iio: imu: inv_mpu6050: Fix deadlock between i2c adapter lock and mpu lock

2016-03-02 Thread Daniel Baluta
On Tue, Mar 1, 2016 at 10:50 PM, Wolfram Sang wrote: > On Thu, Feb 18, 2016 at 05:53:14PM +0200, Daniel Baluta wrote: >> From: Adriana Reus >> >> This deadlock occurs if the accel/gyro and the sensor on the auxiliary >> I2C (in my setup it's an ak89

Re: [PATCH v6 2/2] iio: mcp4531: Driver for Microchip digital potentiometers

2015-09-28 Thread Daniel Baluta
On Mon, Sep 28, 2015 at 10:59 AM, Peter Rosin wrote: > On 2015-09-27 17:50, Jonathan Cameron wrote: >> On 23/09/15 15:26, Peter Rosin wrote: >>> From: Peter Rosin >>> >>> Add support for Microchip digital potentiometers and rheostats >>> MCP4531, MCP4532, MCP4551, MCP4552 >>> MCP4631, M

Re: [PATCH] CHROMIUM: iio: Add Dyna-Image AP3223 ambient light and proximity driver

2015-09-28 Thread Daniel Baluta
CHROMIUM: iio: Add Dyna-Image AP3223 ambient light and proximity driver Please remove CHROMIUM from the commit message. Consider using something like this: iio: light: Add Dyna-Image AP3223 ambient light and proximity driver On Mon, Sep 28, 2015 at 8:00 AM, Suresh Rajashekara wrote: > Minimal i

Re: [PATCH v3] DocBook: Add initial documentation for IIO

2015-07-31 Thread Daniel Baluta
Hi, Thanks a lot for review. >> + Hwmon is very much directed at low sample rate sensors used in >> + applications such as fan speed control and temperature measurement. >> Input >> + is, as its name suggests, focused on human interaction input devices >> + (keyboard, mouse

[PATCH v4] DocBook documentation for IIO

2015-07-31 Thread Daniel Baluta
=143704226629498&w=2 * http://marc.info/?l=linux-iio&m=143707511006898&w=2 * for DocBook warnings reported by Randy, Cristina sent this patchseries: http://marc.info/?l=linux-iio&m=143774363900903&w=2 Daniel Baluta (1): DocBook: Add initial docum

[PATCH v4] DocBook: Add initial documentation for IIO

2015-07-31 Thread Daniel Baluta
This is intended to help developers faster find their way inside the Industrial I/O core and reduce time spent on IIO drivers development. Signed-off-by: Daniel Baluta --- Documentation/DocBook/Makefile | 2 +- Documentation/DocBook/iio.tmpl | 702 + 2

Re: [PATCH] iio: industrialio-buffer: Fix iio_buffer_poll return value

2015-08-03 Thread Daniel Baluta
On Mon, Aug 3, 2015 at 1:37 PM, Cristina Opriceana wrote: > Change return value to 0 if no device is bound since > unsigned int cannot support negative error codes. > > Signed-off-by: Cristina Opriceana Fixes: f18e7a068 ("iio: Return -ENODEV for file operations if the device has been unregistere

Re: [PATCH v2 1/3] iio: magnetometer: Add support for MEMSIC MMC35240 sensor

2015-06-29 Thread Daniel Baluta
On Mon, Jun 29, 2015 at 2:07 AM, Hartmut Knaack wrote: > Daniel Baluta schrieb am 24.04.2015 um 17:58: >> Minimal implementation for MMC35240 3-axis magnetometer >> sensor. It provides processed readings and possiblity to change >> the sampling frequency. >> > &g

[PATCH v7 1/5] configfs: Allow dynamic group (un)registration

2015-08-10 Thread Daniel Baluta
We don't want to hardcode default groups at subsystem creation time. Thus, we export: * configfs_register_group * configfs_unregister_group that allows drivers to programatically create/destroy groups. Signed-off-by: Daniel Baluta --- I am not sure about the locking scheme

[PATCH v7 2/5] iio: core: Introduce IIO configfs support

2015-08-10 Thread Daniel Baluta
This creates an IIO configfs subystem named "iio", with a default "triggers" group. Next patches will add trigger types support, allowing new triggers creation using configfs. Signed-off-by: Daniel Baluta --- drivers/iio/Kconfig | 8 +

[PATCH v7 5/5] iio: Documentation: Add IIO configfs documentation

2015-08-10 Thread Daniel Baluta
Signed-off-by: Daniel Baluta --- Documentation/ABI/testing/configfs-iio | 20 Documentation/iio/iio_configfs.txt | 57 ++ 2 files changed, 77 insertions(+) create mode 100644 Documentation/ABI/testing/configfs-iio create mode 100644

[PATCH v7 4/5] iio: trigger: Introduce IIO hrtimer based trigger

2015-08-10 Thread Daniel Baluta
based on an older version from Marten and Lars-Peter. Signed-off-by: Marten Svanfeldt Signed-off-by: Lars-Peter Clausen Signed-off-by: Daniel Baluta --- drivers/iio/trigger/Kconfig| 10 ++ drivers/iio/trigger/Makefile | 2 + drivers/iio/trigger/iio-trig-hrtimer.c | 193

[PATCH v7 0/5] Add initial configfs support for IIO

2015-08-10 Thread Daniel Baluta
ader in sw_trigger.h o * patch 2/4 - none * patch 3/4 - none * patch 4/4 - removed "Further work" chapter in iio_configfs.txt - added configfs-iio file in Documentation/ABI/testing Daniel Baluta (5):

[PATCH v7 3/5] iio: core: Introduce IIO software triggers

2015-08-10 Thread Daniel Baluta
kernel module is loaded. Software triggers can be created directly from drivers or from user space via configfs interface. Signed-off-by: Daniel Baluta --- drivers/iio/Kconfig | 8 +++ drivers/iio/Makefile | 1 + drivers/iio/industrialio-configfs.c | 49

Re: [PATCH 0/4] tools: iio: Send error messages to stderr

2015-07-07 Thread Daniel Baluta
e1); > + fprintf(stderr, tdres); > | > - printf(e1, e2); > + fprintf(stderr, tdres, e2); > | > - fprintf(stdout, e1) > + fprintf(stderr, tdres) > | > - fprintf(stdout, e1, e2) > + fprintf(stderr, tdres, e2) > ) Nit: s/failiure/failure this appears in several places

Re: [PATCH v2] iio: mcp4xxx_dpot: Driver for Microchip digital potentiometers

2015-09-22 Thread Daniel Baluta
On Tue, Sep 22, 2015 at 12:18 AM, Peter Rosin wrote: > From: Peter Rosin > > Add support for Microchip digital potentiometers and rheostats > MCP4531, MCP4532, MCP4551, MCP4552, > MCP4631, MCP4632, MCP4651, MCP4652 > > These are either single (45xx) or dual (46xx) wipers with eith

Re: [PATCH v3 1/2] iio: resistance: Document that resistance can be output

2015-09-22 Thread Daniel Baluta
On Tue, Sep 22, 2015 at 3:39 PM, Peter Rosin wrote: > From: Peter Rosin > > Signed-off-by: Peter Rosin > --- > Documentation/ABI/testing/sysfs-bus-iio |2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio > b/Documentation/ABI/testing/sysfs-bus-i

<    3   4   5   6   7   8   9   10   11   >