From: Samuel Ortiz <sameo@linux.intel.com>
To: Linus Walleij <linus.walleij@stericsson.com>
Cc: linux-kernel@vger.kernel.org,
Jonas Aaberg <jonas.aberg@stericsson.com>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 4/6] mfd/ab8500: print switch off cause
Date: Tue, 1 May 2012 13:16:29 +0200 [thread overview]
Message-ID: <20120501111629.GD20224@sortiz-mobl> (raw)
In-Reply-To: <1334647840-1736-1-git-send-email-linus.walleij@stericsson.com>
Hi Linus,
On Tue, Apr 17, 2012 at 09:30:40AM +0200, Linus Walleij wrote:
> @@ -1139,7 +1149,20 @@ int __devinit ab8500_init(struct ab8500 *ab8500, enum ab8500_version version)
> AB8500_SWITCH_OFF_STATUS, &value);
> if (ret < 0)
> return ret;
> - dev_info(ab8500->dev, "switch off status: %#x", value);
> + dev_info(ab8500->dev, "switch off cause(s) (%#x): ", value);
> +
> + if (value) {
> + for (i = 0; i < ARRAY_SIZE(switch_off_status); i++) {
> + if (value & 1)
> + printk("\"%s\" ", switch_off_status[i]);
> + value = value >> 1;
> +
> + }
> + printk("\n");
> + } else {
> + printk("None\n");
> + }
So if your default loglevel is not KERN_INFO, you may miss the dev_info
output while getting the printk one. Why not using dev_info() only with e.g.
tabs for the causes ?
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
prev parent reply other threads:[~2012-05-01 11:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 7:30 [PATCH 4/6] mfd/ab8500: print switch off cause Linus Walleij
2012-05-01 11:16 ` Samuel Ortiz [this message]
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=20120501111629.GD20224@sortiz-mobl \
--to=sameo@linux.intel.com \
--cc=jonas.aberg@stericsson.com \
--cc=linus.walleij@linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.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.