]> Pileus Git - ~andy/linux/commitdiff
Merge tag 'regmap/range' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 15 Oct 2012 03:57:42 +0000 (12:57 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 15 Oct 2012 03:57:42 +0000 (12:57 +0900)
regmap: Range API changes

A bunch of updates to the regmap range support, the most important ones
being to rename "n_ranges" to "num_ranges" for consistency and to allow
block writes to cross page boundaries, making things more transparent.

1  2 
arch/arm/mach-omap1/board-ams-delta.c
sound/soc/omap/ams-delta.c
sound/soc/omap/omap-abe-twl6040.c
sound/soc/omap/omap-mcpdm.c

index 5ab9c6bdce847699b21c5cfd5afe90e0666c695f,9518bf5996dccffbf11b284227837c4a96f61a59..e255164ff087ebbb40dcd7e167abbeab71ca27d3
@@@ -26,6 -26,7 +26,7 @@@
  #include <linux/export.h>
  #include <linux/omapfb.h>
  #include <linux/io.h>
+ #include <linux/platform_data/gpio-omap.h>
  
  #include <media/soc_camera.h>
  
  #include <asm/mach/arch.h>
  #include <asm/mach/map.h>
  
- #include <plat/board-ams-delta.h>
- #include <plat/keypad.h>
- #include <plat/mux.h>
- #include <plat/board.h>
+ #include <mach/board-ams-delta.h>
+ #include <linux/platform_data/keypad-omap.h>
+ #include <mach/mux.h>
  
  #include <mach/hardware.h>
  #include <mach/ams-delta-fiq.h>
@@@ -444,28 -444,16 +444,28 @@@ static struct omap1_cam_platform_data a
        .lclk_khz_max   = 1334,         /* results in 5fps CIF, 10fps QCIF */
  };
  
 +static struct platform_device ams_delta_audio_device = {
 +      .name   = "ams-delta-audio",
 +      .id     = -1,
 +};
 +
 +static struct platform_device cx20442_codec_device = {
 +      .name   = "cx20442-codec",
 +      .id     = -1,
 +};
 +
  static struct platform_device *ams_delta_devices[] __initdata = {
        &latch1_gpio_device,
        &latch2_gpio_device,
        &ams_delta_kp_device,
        &ams_delta_camera_device,
 +      &ams_delta_audio_device,
  };
  
  static struct platform_device *late_devices[] __initdata = {
        &ams_delta_nand_device,
        &ams_delta_lcd_device,
 +      &cx20442_codec_device,
  };
  
  static void __init ams_delta_init(void)
index 7b18b748c1773519067cda2f98bbce13d5bcfae2,dc0ee76266261c998ec58a0f433dea92272767b3..d8e96b2cd03ec201306ceaebf3962531f48f0cac
@@@ -32,8 -32,8 +32,8 @@@
  
  #include <asm/mach-types.h>
  
- #include <plat/board-ams-delta.h>
- #include <plat/mcbsp.h>
+ #include <mach/board-ams-delta.h>
+ #include <linux/platform_data/asoc-ti-mcbsp.h>
  
  #include "omap-mcbsp.h"
  #include "omap-pcm.h"
@@@ -575,53 -575,56 +575,53 @@@ static struct snd_soc_card ams_delta_au
  };
  
  /* Module init/exit */
 -static struct platform_device *ams_delta_audio_platform_device;
 -static struct platform_device *cx20442_platform_device;
 -
 -static int __init ams_delta_module_init(void)
 +static __devinit int ams_delta_probe(struct platform_device *pdev)
  {
 +      struct snd_soc_card *card = &ams_delta_audio_card;
        int ret;
  
 -      if (!(machine_is_ams_delta()))
 -              return -ENODEV;
 -
 -      ams_delta_audio_platform_device =
 -                      platform_device_alloc("soc-audio", -1);
 -      if (!ams_delta_audio_platform_device)
 -              return -ENOMEM;
 +      card->dev = &pdev->dev;
  
 -      platform_set_drvdata(ams_delta_audio_platform_device,
 -                              &ams_delta_audio_card);
 -
 -      ret = platform_device_add(ams_delta_audio_platform_device);
 -      if (ret)
 -              goto err;
 -
 -      /*
 -       * Codec platform device could be registered from elsewhere (board?),
 -       * but I do it here as it makes sense only if used with the card.
 -       */
 -      cx20442_platform_device =
 -              platform_device_register_simple("cx20442-codec", -1, NULL, 0);
 +      ret = snd_soc_register_card(card);
 +      if (ret) {
 +              dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
 +              card->dev = NULL;
 +              return ret;
 +      }
        return 0;
 -err:
 -      platform_device_put(ams_delta_audio_platform_device);
 -      return ret;
  }
 -late_initcall(ams_delta_module_init);
  
 -static void __exit ams_delta_module_exit(void)
 +static int __devexit ams_delta_remove(struct platform_device *pdev)
  {
 +      struct snd_soc_card *card = platform_get_drvdata(pdev);
 +
        if (tty_unregister_ldisc(N_V253) != 0)
 -              dev_warn(&ams_delta_audio_platform_device->dev,
 +              dev_warn(&pdev->dev,
                        "failed to unregister V253 line discipline\n");
  
        snd_soc_jack_free_gpios(&ams_delta_hook_switch,
                        ARRAY_SIZE(ams_delta_hook_switch_gpios),
                        ams_delta_hook_switch_gpios);
  
 -      platform_device_unregister(cx20442_platform_device);
 -      platform_device_unregister(ams_delta_audio_platform_device);
 +      snd_soc_unregister_card(card);
 +      card->dev = NULL;
 +      return 0;
  }
 -module_exit(ams_delta_module_exit);
 +
 +#define DRV_NAME "ams-delta-audio"
 +
 +static struct platform_driver ams_delta_driver = {
 +      .driver = {
 +              .name = DRV_NAME,
 +              .owner = THIS_MODULE,
 +      },
 +      .probe = ams_delta_probe,
 +      .remove = __devexit_p(ams_delta_remove),
 +};
 +
 +module_platform_driver(ams_delta_driver);
  
  MODULE_AUTHOR("Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>");
  MODULE_DESCRIPTION("ALSA SoC driver for Amstrad E3 (Delta) videophone");
  MODULE_LICENSE("GPL");
 +MODULE_ALIAS("platform:" DRV_NAME);
index 750d595d01d711c04c9d48fe9144d9cf810d92bc,4a73ef3ae12fdb35bced35e444f45b2eb144275c..a57a4e68dcc6166a2161b49b1d21ab7a8e49dc87
  #include <sound/soc.h>
  #include <sound/jack.h>
  
- #include <asm/mach-types.h>
- #include <plat/hardware.h>
- #include <plat/mux.h>
  #include "omap-dmic.h"
  #include "omap-mcpdm.h"
  #include "omap-pcm.h"
@@@ -220,7 -216,7 +216,7 @@@ static int omap_abe_twl6040_init(struc
        twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk");
        twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk");
        twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out");
 -      twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vinrator");
 +      twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vibrator");
        twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic");
        twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic");
        twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic");
index e134b271a70afc91196f653bfef4e0d8a2393dce,c02b001ee4b51816235147ddb420186c525ecd43..56965bb3275ccd5c2fea1dc3fe143e3e3e7b622d
  #include <sound/pcm_params.h>
  #include <sound/soc.h>
  
 -#include <plat/omap_hwmod.h>
  #include "omap-mcpdm.h"
  #include "omap-pcm.h"
  
+ #define OMAP44XX_MCPDM_L3_BASE                0x49032000
  struct omap_mcpdm {
        struct device *dev;
        unsigned long phys_base;
@@@ -257,9 -260,13 +259,9 @@@ static int omap_mcpdm_dai_startup(struc
        mutex_lock(&mcpdm->mutex);
  
        if (!dai->active) {
 -              /* Enable watch dog for ES above ES 1.0 to avoid saturation */
 -              if (omap_rev() != OMAP4430_REV_ES1_0) {
 -                      u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL);
 +              u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL);
  
 -                      omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL,
 -                                       ctrl | MCPDM_WD_EN);
 -              }
 +              omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, ctrl | MCPDM_WD_EN);
                omap_mcpdm_open_streams(mcpdm);
        }
        mutex_unlock(&mcpdm->mutex);