Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753284AbbFLLvh (ORCPT ); Fri, 12 Jun 2015 07:51:37 -0400 Received: from www.augenpunkt.de ([213.239.207.9]:57206 "EHLO www.augenpunkt.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbbFLLve (ORCPT ); Fri, 12 Jun 2015 07:51:34 -0400 X-Greylist: delayed 1464 seconds by postgrey-1.27 at vger.kernel.org; Fri, 12 Jun 2015 07:51:34 EDT Message-ID: <557AC203.6060600@lategoodbye.de> Date: Fri, 12 Jun 2015 13:26:59 +0200 From: Stefan Wahren User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: =?UTF-8?B?Tm9yYWxmIFRyw7hubmVz?= , linux-arm-kernel@lists.infradead.org CC: devicetree@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org Subject: Re: [PATCH 2/3] watchdog: bcm2835: Add poweroff code for the Raspberry Pi References: <1433845305-17329-1-git-send-email-noralf@tronnes.org> <1433845305-17329-2-git-send-email-noralf@tronnes.org> In-Reply-To: <1433845305-17329-2-git-send-email-noralf@tronnes.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 951 Lines: 31 Hi Noralf, Am 09.06.2015 um 12:21 schrieb Noralf Trønnes: > This adds a new poweroff function to the watchdog driver for the > Raspberry Pi. Currently poweroff/halt results in a reboot. > > [...] > > +static void rpi_power_off(void) > +{ > + struct device_node *np = > + of_find_compatible_node(NULL, NULL, "brcm,raspberrypi-pm-wdt"); > + struct platform_device *pdev = of_find_device_by_node(np); > + struct bcm2835_wdt *wdt = platform_get_drvdata(pdev); > + u32 val; > + > + val = readl_relaxed(wdt->base + PM_RSTS); do you think it's safe here to assume wdt could never be NULL? May be it's necessary to send the series to the watchdog / bcm2835 maintainers to get more feedback. Regards Stefan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/