All of lore.kernel.org
 help / color / mirror / Atom feed
From: friesendrywall@gmail.com (Erik Friesen)
To: linux-arm-kernel@lists.infradead.org
Subject: SGTL5000 misc
Date: Thu, 4 Feb 2016 22:08:35 -0500	[thread overview]
Message-ID: <CAEuupium67HD-sz+ViPx8-L4S0TsS-C8ZrX3po382r=E-9QYgw@mail.gmail.com> (raw)
In-Reply-To: <CAOMZO5BxFRzi3qJAK=xDGger_MK9GZhuM00ugo836PHK_zJKjQ@mail.gmail.com>

There is another issue here, but when I have this connected to
external power, it won't start the card on every other boot.

With the code below, it seems to start every time.  If I don't skip,
it dies on #8, which is the write of 0x7060 to CHIP_ANA_POWER

This embeddedarm board supposedly power cycles the regulators, don't
know if that is a factor or not.  The board finishes powerup 0x4060,
but comes back on reboot at the reset value of 0x7060

static int sgtl5000_fill_defaults(struct sgtl5000_priv *sgtl5000)
{
  int i, ret, val, index;
  int reg;
  for (i = 0; i < ARRAY_SIZE(sgtl5000_reg_defaults); i++) {
    val = sgtl5000_reg_defaults[i].def;
    index = sgtl5000_reg_defaults[i].reg;
    ret = regmap_read(sgtl5000->regmap, index, &reg);
    if (reg != val) {
      ret = regmap_write(sgtl5000->regmap, index, val);
    } else {
     printk(KERN_INFO "SGTL5000 probe skipped at %i with OE val of
%x\n", i, reg);
    }
  if (ret) {
    printk(KERN_WARNING "SGTL5000 probe failed at %i with OE val of
%x\n", i, reg);
    return ret;
    }
  }

  return 0;
}

On Wed, Feb 3, 2016 at 5:20 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Wed, Feb 3, 2016 at 8:05 PM, Erik Friesen <friesendrywall@gmail.com> wrote:
>> Anyway, I think something like this should be added to sgtl5000.c
>
> Yes, please send a formal patch for it.

  reply	other threads:[~2016-02-05  3:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 13:42 SGTL5000 misc Erik Friesen
2016-02-03 14:23 ` Fabio Estevam
2016-02-03 14:33   ` Erik Friesen
2016-02-03 14:38     ` Fabio Estevam
2016-02-03 14:46       ` Erik Friesen
2016-02-03 14:51         ` Fabio Estevam
2016-02-03 15:11           ` Erik Friesen
2016-02-03 22:05             ` Erik Friesen
2016-02-03 22:20               ` Fabio Estevam
2016-02-05  3:08                 ` Erik Friesen [this message]
2016-02-05 10:00                   ` Fabio Estevam
2016-02-06 17:22                     ` Erik Friesen
2016-02-06 17:33                       ` Fabio Estevam
2016-02-06 19:29                         ` Erik Friesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEuupium67HD-sz+ViPx8-L4S0TsS-C8ZrX3po382r=E-9QYgw@mail.gmail.com' \
    --to=friesendrywall@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.