Received: by 10.223.176.46 with SMTP id f43csp432712wra; Wed, 24 Jan 2018 00:05:26 -0800 (PST) X-Google-Smtp-Source: AH8x227Yh5GWCpogu1T6Yaqe6i2vXJfqYZBh/uQKwdVCKf6brkDn/SG4nEoiGNkSgR0CUgKKIij5 X-Received: by 10.98.42.79 with SMTP id q76mr9145051pfq.23.1516781125860; Wed, 24 Jan 2018 00:05:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516781125; cv=none; d=google.com; s=arc-20160816; b=uQRBc9Mk9QqzDguXdk+UnDWHz597JEuHmwluE85xhVXV5+nTt6p8uGP9vJvfxjYdla coLdPl9ZJHQBDhivTm405zo9gGixYTAmJiaJv5sCusMWA47uaQ5Ewi4ymvxwRyPOwwc7 8J63sOIvMDaACJ6/Fjj5qgfQzUfF6SlGWLP3xYDdr0HdLrMANhkfZSytVzrk3NxtF2Cz +fQ4bZPGUae1Ahz9vmAwyLjnE6IJw0L19zzQJpnhVCLgehvbUEbmgKpi/NJHgfM+QEtD Y1UuNwV/PMmfjuCSaO2U04AsWxCMyCR1ZZ/2mCjZuybSA1jJghDFetmtN12hc6q9bm4j BvYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=fzepKS0pEONUrgbpJmS/XSasgHxZmjh0Bed4Ol/4xMY=; b=me7ip0iJeSMcJ/ObJ51q07FKrY2elvsmenJpuegLt7+YwqifPCIQ2u2HTLGPDeL8DO 9rn99LSGuFtM14lHj02M+V21o7/ft7v1ZyUCW81HsYn83VZ7+lPDmWwhcT3Z0tAQBs4N lyYE+g9/YQhwAxEp4kLP4OdXVlRP4JATRfmvnDdKwHXxToTlLECw3Plk89gTmX0r2wUL yioZRX2W5QHEFRFHcJRVXL44DjGwINlZDm83dkzxJvMyrM4eKK/B0JybOLNaRcZK4Vvq vSwxAadi9XOaJmxMCXBexXtxHc44V5ErwuhHwAs9+KxbtaLhJPqYyi1Tf9wqE00eoHMP QFWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=gjaduOhG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 59-v6si5757475plp.298.2018.01.24.00.05.02; Wed, 24 Jan 2018 00:05:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=gjaduOhG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932338AbeAXIDs (ORCPT + 99 others); Wed, 24 Jan 2018 03:03:48 -0500 Received: from mail-oi0-f54.google.com ([209.85.218.54]:37135 "EHLO mail-oi0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752564AbeAXIDq (ORCPT ); Wed, 24 Jan 2018 03:03:46 -0500 Received: by mail-oi0-f54.google.com with SMTP id t78so2259938oih.4 for ; Wed, 24 Jan 2018 00:03:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fzepKS0pEONUrgbpJmS/XSasgHxZmjh0Bed4Ol/4xMY=; b=gjaduOhGFUq1WzXyjcUCYVZDUXMsTuGB5WopHJlxNUwHDWeXT2emCeT1QtgV2s47+F r//BVqsZiTC4Hx69ha3jPC2eGAqkmxXXuHXlzW3huTomOduHUPCcgKD5jYfs9nlzv2Fv Ew5KgEJpo4KFf7nJts8vT9y/t135Ltv/ziEWwDVbxKJnxaNYQSM3ZwfQ28eEj1/AUC0Y qiziR7MKFDCV7AfHu5apANePjpvpIFFMFIdToca71EjjzCX6csE5kLlcMzXcPhEOPpoi 4LuK6oQZVasv960YsEdxamvTCAeO3QqHfzVI7q4+KTSrViBJDTNdYf8b8EnISFdrOjey DH2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fzepKS0pEONUrgbpJmS/XSasgHxZmjh0Bed4Ol/4xMY=; b=q9zfOIUzAiFy+6tMd/yHNzS0l24dki1ImdZn3AgA3miIKyPQZyDq1K1wyS1kkJTaAP JIQYb1Bu5wUjspb76thvWZUTKWCBEQhnVyuMwAmKBTPQpiIel0OYvgYV1zK9ZY05OXsS cns7hdRJ7uVq5JuvzBVGVId3qBWhjzjyMoQ4xaWDzw0tfD9zfsfFrDnWIOjp8t9cfTiM B5WjWpCLrnuCO74DcR1AT4zHI4iCdmEmwTDP+UrSeYFZ8YuBr/69nrQLXmb+yncKB6xV YnuZvmcz1cCUtgfIrn+EDTUWMML4haZqhEyaEw7Smq525eoZ2K2B4yIYyV2ZNS+Bb/Bu c3Bg== X-Gm-Message-State: AKwxytdU52L2mpwyProulYdORxhOYopqUCSrZlfDH+YhPBJTA1O+rr5G Q1Dph1FoPpXauVKGc0WsvWRHWVBV9CjhvmLQyA3hZw== X-Received: by 10.202.236.3 with SMTP id k3mr8008742oih.351.1516781025747; Wed, 24 Jan 2018 00:03:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.24.23 with HTTP; Wed, 24 Jan 2018 00:03:45 -0800 (PST) In-Reply-To: References: <1516468460-4908-1-git-send-email-david@lechnology.com> <615bc302-e129-1501-63be-fa701f5ecaad@lechnology.com> <5f836454-5de7-c51d-d262-2c2dbc26e438@lechnology.com> From: Bartosz Golaszewski Date: Wed, 24 Jan 2018 09:03:45 +0100 Message-ID: Subject: =?UTF-8?Q?Re=3A_=5BPATCH_v6_00=2F41=5D_ARM=3A_davinci=3A_convert_to_common?= =?UTF-8?Q?_clock_framework=E2=80=8B?= To: David Lechner Cc: Adam Ford , linux-clk@vger.kernel.org, devicetree , linux-arm-kernel@lists.infradead.org, Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Sekhar Nori , Kevin Hilman , Bartosz Golaszewski , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-01-23 21:23 GMT+01:00 David Lechner : > On 01/23/2018 02:05 PM, David Lechner wrote: >> >> On 01/23/2018 02:01 PM, David Lechner wrote: >>> >>> On 01/23/2018 01:53 PM, Bartosz Golaszewski wrote: >>>> >>>> >>>> In the mdio case - the problem is that devm_clk_get() doesn't fail, >>>> but somehow the clock doesn't end up in the list of the device's >>>> clocks - which is why it's not enabled by pm_runtime_get_sync(). >>>> >>> >>> >>> Right. This is because devm_clk_get() now finds the clock via device >>> tree instead of a clkdev lookup entry. However, I think that the PM >>> notifier registered in arch/arm/mach-davinci/pm_domain.c only uses >>> the clkdev lookup to match the con_id and does not use device tree. >>> The same thing is happing in mdio, emac and lcdc. >>> >> >> Minor correction: It looks like emac doesn't do this because it doesn't >> have a con_id of "fck". But, the same clock is shared by emac and mdio, so >> since mdio enables the clock, emac doesn't notice or care that it did >> not enable the clock itself. > > > How about using pm_clk_add_clk() in these drivers to explicitly use the > clocks for power management instead of relying on pm_clk_add_notifier() > to do this implicitly? Yes, this sounds good. Bartosz