Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3510895ybl; Sun, 12 Jan 2020 20:10:11 -0800 (PST) X-Google-Smtp-Source: APXvYqy+gU9D7h9/R7tPKyLeb5l+dIe62NWoXdeU08MplEbIlN4N0YzDADhzLe397derzFjmIXG3 X-Received: by 2002:a9d:6a54:: with SMTP id h20mr9011762otn.208.1578888610968; Sun, 12 Jan 2020 20:10:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578888610; cv=none; d=google.com; s=arc-20160816; b=iWyoLOIn00wWvPHrkTiTgW7zQi85j7MCCZHj45/BvDoWKGMnsUvnsHLphGyusTpmI9 lKkjtOTVpssjZ/7k8PjLjUF71hJESf7mfN1j65DScHOXj2xFKoljgofP1Q+v2ao/KkVT +UtAB6z9jfYsyI7F2rOgAWTWv/Ji1CicUyT8Of/HdZExnU1Pu597I4mge5HoHVrS7GEu JV62sDa7lC/knBDgvYi3Ei4/K5sUPcE3MKbyQmHDJcwIrs9/0K5rr+pOzKCjfNDG9Hx9 Nsq/q57q4OkK5hkc1Q+eakfv1Y6sQBkaXJsovOh4+ZxyTKgfY9oi2cfiOq/tsO0kGLsx dJWg== 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 :in-reply-to:references:mime-version; bh=VRG/asPsXrvPYXyKX7n6EnWclC+DWZV9ykIQcZ3tJv4=; b=LmbwoptHVRUyWS6UvpQyDgKEbw+cdJ5FiJbVE8c5YC2EJfHUpt5MPyRbsQ4S6oikfb 0rvsGO03M46WXaivZCbRNAMRDA4ijVgScQXHvc30vDqPnUDJu2rt6Br3lO+mb/pGinRv w3FpvOtQU3ab8jaq666mKu80HRzDOkFnbeRmDDO2PRNIwXXqAunBiuvGCR7RuxBZWxID b+piqPqgW4MZh842sieGpQrsdo8uetMVDIJQEe1BlRWin56omNF/nMegQnFk9DSagNX4 mJxZGYrn5J+9ansWLkcj5LmJy618OGlnh/e1lwnQa36U2iBzuowDaSaC47AiKuDVlG/c KhKA== ARC-Authentication-Results: i=1; mx.google.com; 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 m20si6508607otk.279.2020.01.12.20.09.58; Sun, 12 Jan 2020 20:10:10 -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; 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 S2387519AbgAMEJH (ORCPT + 99 others); Sun, 12 Jan 2020 23:09:07 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:46637 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387460AbgAMEJH (ORCPT ); Sun, 12 Jan 2020 23:09:07 -0500 Received: by mail-ed1-f66.google.com with SMTP id m8so7231776edi.13; Sun, 12 Jan 2020 20:09:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VRG/asPsXrvPYXyKX7n6EnWclC+DWZV9ykIQcZ3tJv4=; b=VhUwBl1qnUjF1F1gbW0UVlJYWJSPyIjfWGV3wss5dciLYCid7AwMe0lsV0drxzKEbm 82fJaRsY1WXo7ngzevxrSeT6Cbce4kKRnlyaUjGOD+lK4B9odwBZaQ0E5DGWWRbsXo2A 5twNEOFRDnx5IHGLPxbTrbcQtkqkWRjWWf7wwb8Ktosi0esees0S+uAjwfuTzagsiaru 98Apwa0CoJqYbjkXNZHfV5uy0UnbwA/CzLTfC2HrPCwOWS0km7+hUzCdh0DGf+gyu+Fh CvkFvTqwAZS5xO6NrwiRmWsm9nLjaOhP9rd6Kn9R4pJHu+s1BMbRNZtYUoNKjkGPTvDg Mkzg== X-Gm-Message-State: APjAAAVbO20jjBSur9c7UQ1uDO5Ur6F8pkjNTOTQlZOfkhPLnEI3QmGS 6xPY/E3MbJB8mKDmUQP6dKeDobJtOOk= X-Received: by 2002:a17:906:3591:: with SMTP id o17mr14882175ejb.209.1578888544938; Sun, 12 Jan 2020 20:09:04 -0800 (PST) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com. [209.85.128.42]) by smtp.gmail.com with ESMTPSA id w10sm424722eds.69.2020.01.12.20.09.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Jan 2020 20:09:04 -0800 (PST) Received: by mail-wm1-f42.google.com with SMTP id w5so8837613wmi.1; Sun, 12 Jan 2020 20:09:04 -0800 (PST) X-Received: by 2002:a7b:cf12:: with SMTP id l18mr18568407wmg.66.1578888544372; Sun, 12 Jan 2020 20:09:04 -0800 (PST) MIME-Version: 1.0 References: <20200113035310.18950-1-samuel@sholland.org> <20200113035310.18950-6-samuel@sholland.org> In-Reply-To: <20200113035310.18950-6-samuel@sholland.org> From: Chen-Yu Tsai Date: Mon, 13 Jan 2020 12:08:55 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 5/8] power: supply: axp20x_usb_power: Use a match structure To: Samuel Holland Cc: Sebastian Reichel , Oskari Lemmela , "open list:THERMAL" , linux-kernel , linux-sunxi 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 On Mon, Jan 13, 2020 at 11:53 AM Samuel Holland wrote: > > Instead of ad-hoc variant ID checks throughout the code, let's start > moving the variant-specific details to a match structure. This allows > for future flexibility, and it better matches the other axp20x power > supply drivers. > > This commit removes most variant checks from axp20x_usb_power_probe(). > Other parts of the driver still do ID matching; they are left unchanged > for now. > > Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai