Re: [PATCH v2 0/6] Enable Greybus Audio codec driver

2020-06-10 Thread Alexandre Belloni
On 10/06/2020 18:37:11+0100, Mark Brown wrote:
> On Wed, Jun 10, 2020 at 10:58:24PM +0530, Vaibhav Agarwal wrote:
> > The existing GB Audio codec driver is dependent on MSM8994 Audio driver.
> > During the development stage, this dependency was configured due to
> > various changes involved in MSM Audio driver to enable addtional codec
> > card and some of the changes proposed in mainline ASoC framework.
> 
> I'm not sure why you're copying me on a staging driver?  I don't recall
> the base driver having been submitted properly yet.

That was my suggestion, the whole history is that I submitted a patch
removing this driver as it was not getting compiled and so didn't go
through the componentization. See
https://lore.kernel.org/lkml/20200507212912.599433-1-alexandre.bell...@bootlin.com/

My point was that if we were to keep that driver, the goal would be to
have it out of staging instead of simply making it compile.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH V1 5/6] staging: greybus: audio: Add helper APIs for dynamic audio modules

2020-05-17 Thread Alexandre Belloni
IG_DEBUG_FS
> + if (!parent)
> + debugfs_w = debugfs_lookup(w->name, parent);
> + debugfs_remove(debugfs_w);
> + debugfs_w = NULL;
> +#endif
> + gbaudio_dapm_free_widget(w);
> + }
> + mutex_unlock(>card->dapm_mutex);
> + return 0;
> +}
> +
> +static int gbaudio_remove_controls(struct snd_card *card, struct device *dev,
> +const struct snd_kcontrol_new *controls,
> +int num_controls, const char *prefix)
> +{
> + int i, err;
> +
> + for (i = 0; i < num_controls; i++) {
> + const struct snd_kcontrol_new *control = [i];
> + struct snd_ctl_elem_id id;
> + struct snd_kcontrol *kctl;
> +
> + if (prefix)
> + snprintf(id.name, sizeof(id.name), "%s %s", prefix,
> +  control->name);
> + else
> + strlcpy(id.name, control->name, sizeof(id.name));
> + id.numid = 0;
> + id.iface = control->iface;
> + id.device = control->device;
> + id.subdevice = control->subdevice;
> + id.index = control->index;
> + kctl = snd_ctl_find_id(card, );
> + if (!kctl) {
> + dev_err(dev, "%d: Failed to find %s\n", err,
> + control->name);
> + return -ENOENT;
> + }
> + err = snd_ctl_remove(card, kctl);
> + if (err < 0) {
> + dev_err(dev, "%d: Failed to remove %s\n", err,
> + control->name);
> + return err;
> + }
> + }
> + return 0;
> +}
> +
> +int gbaudio_remove_component_controls(struct snd_soc_component *component,
> +   const struct snd_kcontrol_new *controls,
> +   unsigned int num_controls)
> +{
> + struct snd_card *card = component->card->snd_card;
> +
> + return gbaudio_remove_controls(card, component->dev, controls,
> +num_controls, component->name_prefix);
> +}
> diff --git a/drivers/staging/greybus/audio_helper.h 
> b/drivers/staging/greybus/audio_helper.h
> new file mode 100644
> index ..5cf1c6d7d3ea
> --- /dev/null
> +++ b/drivers/staging/greybus/audio_helper.h
> @@ -0,0 +1,17 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Greybus Audio Sound SoC helper APIs
> + */
> +
> +#ifndef __LINUX_GBAUDIO_HELPER_H
> +#define __LINUX_GBAUDIO_HELPER_H
> +
> +int gbaudio_dapm_link_component_dai_widgets(struct snd_soc_card *card,
> + struct snd_soc_dapm_context *dapm);
> +int gbaudio_dapm_free_controls(struct snd_soc_dapm_context *dapm,
> +const struct snd_soc_dapm_widget *widget,
> +int num);
> +int gbaudio_remove_component_controls(struct snd_soc_component *component,
> +   const struct snd_kcontrol_new *controls,
> +   unsigned int num_controls);
> +#endif
> -- 
> 2.7.4
> 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] greybus: audio: remove unused code

2020-05-07 Thread Alexandre Belloni
GREYBUS_AUDIO_MSM8994 is not an existing configuration option and as
reported in September 2016, it depends on an "out-of-tree qualcomm audio
driver". This driver never made it upstream.

https://lore.kernel.org/lkml/20160921073905.ga31...@kroah.com/

Moreover, there doesn't seem to be any interest in actually fixing the
driver as it uses ASoC APIs that have been removed from the kernel in 2018
as shown by its use of snd_soc_register_codec and
snd_soc_codec_get_drvdata, removed in commit 999f7f5af8eb ("ASoC: remove
Codec related code").

Signed-off-by: Alexandre Belloni 
---
 drivers/staging/greybus/Makefile |4 -
 drivers/staging/greybus/audio_codec.c| 1103 
 drivers/staging/greybus/audio_module.c   |  478 ---
 drivers/staging/greybus/audio_topology.c | 1448 --
 4 files changed, 3033 deletions(-)
 delete mode 100644 drivers/staging/greybus/audio_codec.c
 delete mode 100644 drivers/staging/greybus/audio_module.c
 delete mode 100644 drivers/staging/greybus/audio_topology.c

diff --git a/drivers/staging/greybus/Makefile b/drivers/staging/greybus/Makefile
index 627e44f2a983..af88583cdc20 100644
--- a/drivers/staging/greybus/Makefile
+++ b/drivers/staging/greybus/Makefile
@@ -27,8 +27,6 @@ obj-$(CONFIG_GREYBUS_RAW) += gb-raw.o
 obj-$(CONFIG_GREYBUS_VIBRATOR) += gb-vibrator.o
 
 # Greybus Audio is a bunch of modules
-gb-audio-module-y  := audio_module.o audio_topology.o
-gb-audio-codec-y   := audio_codec.o
 gb-audio-gb-y  := audio_gb.o
 gb-audio-apbridgea-y   := audio_apbridgea.o
 gb-audio-manager-y := audio_manager.o audio_manager_module.o
@@ -40,8 +38,6 @@ gb-audio-manager-y:= audio_manager.o 
audio_manager_module.o
 #ccflags-y += -DGB_AUDIO_MANAGER_SYSFS
 #endif
 
-obj-$(CONFIG_GREYBUS_AUDIO_MSM8994)+= gb-audio-codec.o
-obj-$(CONFIG_GREYBUS_AUDIO_MSM8994)+= gb-audio-module.o
 obj-$(CONFIG_GREYBUS_AUDIO)+= gb-audio-gb.o
 obj-$(CONFIG_GREYBUS_AUDIO)+= gb-audio-apbridgea.o
 obj-$(CONFIG_GREYBUS_AUDIO)+= gb-audio-manager.o
diff --git a/drivers/staging/greybus/audio_codec.c 
b/drivers/staging/greybus/audio_codec.c
deleted file mode 100644
index 08746c85dea6..
--- a/drivers/staging/greybus/audio_codec.c
+++ /dev/null
@@ -1,1103 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * APBridge ALSA SoC dummy codec driver
- * Copyright 2016 Google Inc.
- * Copyright 2016 Linaro Ltd.
- */
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "audio_codec.h"
-#include "audio_apbridgea.h"
-#include "audio_manager.h"
-
-static struct gbaudio_codec_info *gbcodec;
-
-static struct gbaudio_data_connection *
-find_data(struct gbaudio_module_info *module, int id)
-{
-   struct gbaudio_data_connection *data;
-
-   list_for_each_entry(data, >data_list, list) {
-   if (id == data->id)
-   return data;
-   }
-   return NULL;
-}
-
-static struct gbaudio_stream_params *
-find_dai_stream_params(struct gbaudio_codec_info *codec, int id, int stream)
-{
-   struct gbaudio_codec_dai *dai;
-
-   list_for_each_entry(dai, >dai_list, list) {
-   if (dai->id == id)
-   return >params[stream];
-   }
-   return NULL;
-}
-
-static int gbaudio_module_enable_tx(struct gbaudio_codec_info *codec,
-   struct gbaudio_module_info *module, int id)
-{
-   int module_state, ret = 0;
-   u16 data_cport, i2s_port, cportid;
-   u8 sig_bits, channels;
-   u32 format, rate;
-   struct gbaudio_data_connection *data;
-   struct gbaudio_stream_params *params;
-
-   /* find the dai */
-   data = find_data(module, id);
-   if (!data) {
-   dev_err(module->dev, "%d:DATA connection missing\n", id);
-   return -ENODEV;
-   }
-   module_state = data->state[SNDRV_PCM_STREAM_PLAYBACK];
-
-   params = find_dai_stream_params(codec, id, SNDRV_PCM_STREAM_PLAYBACK);
-   if (!params) {
-   dev_err(codec->dev, "Failed to fetch dai_stream pointer\n");
-   return -EINVAL;
-   }
-
-   /* register cport */
-   if (module_state < GBAUDIO_CODEC_STARTUP) {
-   i2s_port = 0;   /* fixed for now */
-   cportid = data->connection->hd_cport_id;
-   ret = gb_audio_apbridgea_register_cport(data->connection,
-   i2s_port, cportid,
-   AUDIO_APBRIDGEA_DIRECTION_TX);
-   if (ret) {
-   dev_err_ratelimited(module->dev,
-   "reg_cport failed:%d\n", ret);
-   return ret;
-   }
-   data->state[SNDRV_PCM_STREAM_PLAYBACK] 

Re: [PATCH 27/40] rtc/proc: switch to proc_create_single_data

2018-04-25 Thread Alexandre Belloni
On 25/04/2018 17:48:14+0200, Christoph Hellwig wrote:
> And stop trying to get a reference on the submodule, procfs code deals
> with release after and unloaded module and thus removed proc entry.
small typo here^

> 
> Signed-off-by: Christoph Hellwig <h...@lst.de>

Acked-by: Alexandre Belloni <alexandre.bell...@bootlin.com>


> ---
>  drivers/rtc/rtc-proc.c | 33 ++---
>  1 file changed, 2 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-proc.c b/drivers/rtc/rtc-proc.c
> index 31e7e23cc5be..a9dd9218fae2 100644
> --- a/drivers/rtc/rtc-proc.c
> +++ b/drivers/rtc/rtc-proc.c
> @@ -107,40 +107,11 @@ static int rtc_proc_show(struct seq_file *seq, void 
> *offset)
>   return 0;
>  }
>  
> -static int rtc_proc_open(struct inode *inode, struct file *file)
> -{
> - int ret;
> - struct rtc_device *rtc = PDE_DATA(inode);
> -
> - if (!try_module_get(rtc->owner))
> - return -ENODEV;
> -
> - ret = single_open(file, rtc_proc_show, rtc);
> - if (ret)
> - module_put(rtc->owner);
> - return ret;
> -}
> -
> -static int rtc_proc_release(struct inode *inode, struct file *file)
> -{
> - int res = single_release(inode, file);
> - struct rtc_device *rtc = PDE_DATA(inode);
> -
> - module_put(rtc->owner);
> - return res;
> -}
> -
> -static const struct file_operations rtc_proc_fops = {
> - .open   = rtc_proc_open,
> - .read   = seq_read,
> - .llseek = seq_lseek,
> - .release= rtc_proc_release,
> -};
> -
>  void rtc_proc_add_device(struct rtc_device *rtc)
>  {
>   if (is_rtc_hctosys(rtc))
> - proc_create_data("driver/rtc", 0, NULL, _proc_fops, rtc);
> +     proc_create_single_data("driver/rtc", 0, NULL, rtc_proc_show,
> + rtc);
>  }
>  
>  void rtc_proc_del_device(struct rtc_device *rtc)
> -- 
> 2.17.0
> 

-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 26/39] rtc/proc: switch to proc_create_single_data

2018-04-19 Thread Alexandre Belloni
On 19/04/2018 14:41:27+0200, Christoph Hellwig wrote:
> And stop trying to get a reference on the submodule, procfs code deals
> with release after and unloaded module and thus removed proc entry.
> 

Are you sure about that? The rtc module is not the one adding the procfs
file so I'm not sure how the procfs code can handle it.

> Signed-off-by: Christoph Hellwig <h...@lst.de>
> ---
>  drivers/rtc/rtc-proc.c | 33 ++---
>  1 file changed, 2 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-proc.c b/drivers/rtc/rtc-proc.c
> index 31e7e23cc5be..a9dd9218fae2 100644
> --- a/drivers/rtc/rtc-proc.c
> +++ b/drivers/rtc/rtc-proc.c
> @@ -107,40 +107,11 @@ static int rtc_proc_show(struct seq_file *seq, void 
> *offset)
>   return 0;
>  }
>  
> -static int rtc_proc_open(struct inode *inode, struct file *file)
> -{
> - int ret;
> - struct rtc_device *rtc = PDE_DATA(inode);
> -
> - if (!try_module_get(rtc->owner))
> - return -ENODEV;
> -
> - ret = single_open(file, rtc_proc_show, rtc);
> - if (ret)
> - module_put(rtc->owner);
> - return ret;
> -}
> -
> -static int rtc_proc_release(struct inode *inode, struct file *file)
> -{
> - int res = single_release(inode, file);
> - struct rtc_device *rtc = PDE_DATA(inode);
> -
> - module_put(rtc->owner);
> - return res;
> -}
> -
> -static const struct file_operations rtc_proc_fops = {
> - .open   = rtc_proc_open,
> - .read   = seq_read,
> - .llseek = seq_lseek,
> - .release= rtc_proc_release,
> -};
> -
>  void rtc_proc_add_device(struct rtc_device *rtc)
>  {
>   if (is_rtc_hctosys(rtc))
> - proc_create_data("driver/rtc", 0, NULL, _proc_fops, rtc);
> + proc_create_single_data("driver/rtc", 0, NULL, rtc_proc_show,
> + rtc);
>  }
>  
>  void rtc_proc_del_device(struct rtc_device *rtc)
> -- 
> 2.17.0
> 

-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/8] media: v4l2-async: simplify v4l2_async_subdev structure

2017-12-18 Thread Alexandre Belloni
On 18/12/2017 at 17:53:57 -0200, Mauro Carvalho Chehab wrote:
> The V4L2_ASYNC_MATCH_FWNODE match criteria requires just one
> struct to be filled (struct fwnode_handle). The V4L2_ASYNC_MATCH_DEVNAME
> match criteria requires just a device name.
> 
> So, it doesn't make sense to enclose those into structs,
> as the criteria can go directly into the union.
> 
> That makes easier to document it, as we don't need to document
> weird senseless structs.
> 
> At drivers, this makes even clearer about the match criteria.
> 

For atmel:
Acked-by: Alexandre Belloni <alexandre.bell...@free-electrons.com>

> Acked-by: Sylwester Nawrocki <s.nawro...@samsung.com>
> Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com>
> ---
>  drivers/media/platform/am437x/am437x-vpfe.c|  6 +++---
>  drivers/media/platform/atmel/atmel-isc.c   |  2 +-
>  drivers/media/platform/atmel/atmel-isi.c   |  2 +-
>  drivers/media/platform/davinci/vpif_capture.c  |  4 ++--
>  drivers/media/platform/exynos4-is/media-dev.c  |  4 ++--
>  drivers/media/platform/pxa_camera.c|  2 +-
>  drivers/media/platform/qcom/camss-8x16/camss.c |  2 +-
>  drivers/media/platform/rcar-vin/rcar-core.c|  2 +-
>  drivers/media/platform/rcar_drif.c |  4 ++--
>  drivers/media/platform/soc_camera/soc_camera.c |  2 +-
>  drivers/media/platform/stm32/stm32-dcmi.c  |  2 +-
>  drivers/media/platform/ti-vpe/cal.c|  2 +-
>  drivers/media/platform/xilinx/xilinx-vipp.c|  2 +-
>  drivers/media/v4l2-core/v4l2-async.c   | 16 
>  drivers/media/v4l2-core/v4l2-fwnode.c  | 10 +-
>  drivers/staging/media/imx/imx-media-dev.c  |  4 ++--
>  include/media/v4l2-async.h |  8 ++--
>  17 files changed, 35 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/media/platform/am437x/am437x-vpfe.c 
> b/drivers/media/platform/am437x/am437x-vpfe.c
> index 0997c640191d..601ae6487617 100644
> --- a/drivers/media/platform/am437x/am437x-vpfe.c
> +++ b/drivers/media/platform/am437x/am437x-vpfe.c
> @@ -2304,8 +2304,8 @@ vpfe_async_bound(struct v4l2_async_notifier *notifier,
>   vpfe_dbg(1, vpfe, "vpfe_async_bound\n");
>  
>   for (i = 0; i < ARRAY_SIZE(vpfe->cfg->asd); i++) {
> - if (vpfe->cfg->asd[i]->match.fwnode.fwnode ==
> - asd[i].match.fwnode.fwnode) {
> + if (vpfe->cfg->asd[i]->match.fwnode ==
> + asd[i].match.fwnode) {
>   sdinfo = >cfg->sub_devs[i];
>   vpfe->sd[i] = subdev;
>   vpfe->sd[i]->grp_id = sdinfo->grp_id;
> @@ -2510,7 +2510,7 @@ vpfe_get_pdata(struct platform_device *pdev)
>   }
>  
>   pdata->asd[i]->match_type = V4L2_ASYNC_MATCH_FWNODE;
> - pdata->asd[i]->match.fwnode.fwnode = of_fwnode_handle(rem);
> + pdata->asd[i]->match.fwnode = of_fwnode_handle(rem);
>   of_node_put(rem);
>   }
>  
> diff --git a/drivers/media/platform/atmel/atmel-isc.c 
> b/drivers/media/platform/atmel/atmel-isc.c
> index 0c2635647f69..34676409ca08 100644
> --- a/drivers/media/platform/atmel/atmel-isc.c
> +++ b/drivers/media/platform/atmel/atmel-isc.c
> @@ -2088,7 +2088,7 @@ static int isc_parse_dt(struct device *dev, struct 
> isc_device *isc)
>   subdev_entity->pfe_cfg0 |= ISC_PFE_CFG0_PPOL_LOW;
>  
>   subdev_entity->asd->match_type = V4L2_ASYNC_MATCH_FWNODE;
> - subdev_entity->asd->match.fwnode.fwnode =
> + subdev_entity->asd->match.fwnode =
>   of_fwnode_handle(rem);
>   list_add_tail(_entity->list, >subdev_entities);
>   }
> diff --git a/drivers/media/platform/atmel/atmel-isi.c 
> b/drivers/media/platform/atmel/atmel-isi.c
> index e900995143a3..9958918e2449 100644
> --- a/drivers/media/platform/atmel/atmel-isi.c
> +++ b/drivers/media/platform/atmel/atmel-isi.c
> @@ -1128,7 +1128,7 @@ static int isi_graph_parse(struct atmel_isi *isi, 
> struct device_node *node)
>   /* Remote node to connect */
>   isi->entity.node = remote;
>   isi->entity.asd.match_type = V4L2_ASYNC_MATCH_FWNODE;
> - isi->entity.asd.match.fwnode.fwnode = of_fwnode_handle(remote);
> + isi->entity.asd.match.fwnode = of_fwnode_handle(remote);
>   return 0;
>   }
>  }
> diff --git a/drivers/media/platform/davinci/vpif_capture.c 
> b/drivers/media/platform/davinci/vpif_capture.c
> index e45916f69def..e1c273c8b9a6 100644
> --- a/drivers/media/platform/da

Re: [PATCHv6] staging/iio/adc: change the MXS touchscreen driver implementation

2014-02-24 Thread Alexandre Belloni
Hi Juergen,

On 24/02/2014 at 14:16:24 +0100, Juergen Beisert wrote :
 Hi Alexandre,
 
  While I don't have much experience with the TS part of the code but I
  can investigate if you don't have any idea.
 
 can you please test the following patch?
 After releasing the touchscreen the internal state machine was left in a
 wrong state.
 

This seems to solve the issue. You can send the patch with my Tested-by.

It is probably worth trying to get it in 3.14.

Thanks !

 diff --git a/drivers/staging/iio/adc/mxs-lradc.c 
 b/drivers/staging/iio/adc/mxs-lradc.c
 index e2dd783..558a76c 100644
 --- a/drivers/staging/iio/adc/mxs-lradc.c
 +++ b/drivers/staging/iio/adc/mxs-lradc.c
 @@ -698,6 +698,7 @@ static void mxs_lradc_finish_touch_event(struct mxs_lradc 
 *lradc, bool valid)
 }
 
 /* if it is released, wait for the next touch via IRQ */
 +   lradc-cur_plate = LRADC_TOUCH;
 mxs_lradc_reg_clear(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ, LRADC_CTRL1);
 mxs_lradc_reg_set(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ_EN, 
 LRADC_CTRL1);
  }
 
 Regards,
 Juergen
 
 -- 
 Pengutronix e.K.                              | Juergen Beisert             |
 Linux Solutions for Science and Industry      | Phone: +49-5121-206917-5128 |
 Peiner Str. 6-8, 31137 Hildesheim, Germany    | Fax:   +49-5121-206917- |
 Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging/iio/adc/MXS/LRADC: fix touchscreen statemachine

2014-02-24 Thread Alexandre Belloni
On 24/02/2014 at 15:39:53 +0100, Juergen Beisert wrote :
 Releasing the touchscreen lets the internal statemachine left in a wrong 
 state.
 Due to this the release coordinate will be reported again by accident when 
 the next
 touchscreen event happens. This change sets up the correct state when waiting
 for the next touchscreen event.
 
 Signed-off-by: Juergen Beisert j...@pengutronix.de
 

Tested-by: Alexandre Belloni alexandre.bell...@free-electrons.com

 diff --git a/drivers/staging/iio/adc/mxs-lradc.c 
 b/drivers/staging/iio/adc/mxs-lradc.c
 index 7fc66a6..514844e 100644
 --- a/drivers/staging/iio/adc/mxs-lradc.c
 +++ b/drivers/staging/iio/adc/mxs-lradc.c
 @@ -757,6 +757,7 @@ static void mxs_lradc_finish_touch_event(struct mxs_lradc 
 *lradc, bool valid)
   }
  
   /* if it is released, wait for the next touch via IRQ */
 + lradc-cur_plate = LRADC_TOUCH;
   mxs_lradc_reg_clear(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ, LRADC_CTRL1);
   mxs_lradc_reg_set(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ_EN, LRADC_CTRL1);
  }
 
 -- 
 Pengutronix e.K.                              | Juergen Beisert             |
 Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCHv6] staging/iio/adc: change the MXS touchscreen driver implementation

2014-01-09 Thread Alexandre Belloni
 (Pressure), value 0
Event: time 1389210025.216819, type 1 (Key), code 330 (Touch), value 0
Event: time 1389210025.216819, -- Report Sync 


While this is not necessarily an issue with ts_calibrate (it is possible
to click longer so it collects more samples), I don't see that working
with xinput_calibrator.

While I don't have much experience with the TS part of the code but I
can investigate if you don't have any idea.


On 23/09/2013 16:36, Juergen Beisert wrote:
 The following series replaces the current busy loop touchscreen implementation
 for i.MX28/i.MX23 SoCs by a fully interrupt driven implementation.
 
 Since i.MX23 and i.MX28 silicon differs, the existing implementation can
 be used for the i.MX28 SoC only.
 
 The first patch adds proper clock handling. Various platforms seems to disable
 the internal 2 kHz clock which is used by the LRADC delay units.
 
 The next two patches of this series move the i.MX28 specific definitions
 out of the way. The forth patch simplifies the register access to make it 
 easier
 to add the i.MX23 support. Then the i.MX23 specific definitions are added, 
 also
 the code to distinguish both SoCs at run-time.
 Up to here the existing touchscreen driver will now run on an i.MX23 Soc as 
 well.
 
 When these i.MX SoCs are running from battery it seems not to be a good idea 
 to
 run a busy loop to detect touches and their location. The 6th patch adds a
 fully interrupt driven implementation which makes use of the built-in delay
 and multiple sample features of the touchscreen controller. This will reduce
 the interrupt load to a minimum.
 
 The remaining patches in this series just removes the existing busy loop
 implementation, add a proposal for devicetree binding and a reminder what has
 still to be done with the LRADC driver.
 
 Changes since v5:
 
 - add missing clock handling which prevents the delay units from work (this
   should make it work on the MX28EVK and M28EVK as well)
 
 Changes since v4:
 
 - honor Jonathan's comments about function names
 - honor Dmitry's comments about workqueue canceling and interrupts
 - adding devicetree bindings proposal
 
 Changes since v3:
 
 - split adding register access functions and i.MX23 support into two patches
 
 Changes since v2:
 
 - useless debug output removed
 
 Changes since v1:
 
 - adding register access functions to make the existing code more readable
 - adding some functions to distinguish the SoCs at run-time to avoid if-else
   contructs whenever differences in the register layout between i.MX23 and
   i.MX28 must be handled
 
 Comments are welcome.
 
 Juergen
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-iio in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel