Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1161335pxx; Fri, 30 Oct 2020 03:47:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbJ+VrLdMe5MmPI5qUN8PpYFimASGsA06aFpyqdLpqVl0/zclBKxESbfSwXodhvYp6az9S X-Received: by 2002:a05:6402:1119:: with SMTP id u25mr1659976edv.37.1604054852881; Fri, 30 Oct 2020 03:47:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604054852; cv=none; d=google.com; s=arc-20160816; b=n0nOQq+M2NO1Ynr49KrqW9as7TN/s6vQ3KW9LGiKJxXBdAFm1bPEEXSPV4S9etee3k fg0tTAG/wTl6jAf8Bbzl7djLBQza6eptNlqcCz3Y29PJOQlIAai8OCUWQM5wHzl2J4O/ 3tAJhFz7YTIe3IlEK4eecSiU4S0k17bAj0/3rmC6ocy2f027nASGQz+F/1fEI6Gd2quo 6wnYakEXxqc966D75VGkpF51lTbSLActcRYARKt73YG315Dyh0/zme5ZyojPkMNEohEc IoY8tY3YFhRV0RspQWrpSy1Pd6JQCrGF5e/hH/vyhbbTPo6nj9HuWJM4kamjpCa9q2Cv G7Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2Vp04XlTq8q6PvR0niNIacoFE1XLr2j/31g+nEkBUEQ=; b=iqTjN85tGMIKanNj9vIAv8c4JQLr10/M9eSx9oqjPrtyQgQfrV3RRCHz9fmBW9DrQQ /DSto6b/kq31vbq5ggZLqmWgLWk5EbIltXU5NfxCto3PKtydAH0X6SFmsrrO1X4YOrR1 hZ0vDNwJ3Ti3g2UsP5B7MxeL64plZd2vrnKOleN/0LD75a7zv2pE49IlDGI6HlcNhsOl gHkGvrQ86vIgmAol3AoZ6Zk47fcUhF40ytEAMgwWm4YHMjw5t9JqW0+fYCzTI4OwJxg8 ie5uaofuFKQufPTrMSzSNu1bWrPX+KITKg8S/qp9ArFBB4sn+FPpFlvO77TzIYWj61re ZM4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y0hgzA+z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu8si4985377edb.95.2020.10.30.03.47.10; Fri, 30 Oct 2020 03:47:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y0hgzA+z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726294AbgJ3Kpm (ORCPT + 99 others); Fri, 30 Oct 2020 06:45:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:34660 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbgJ3Kpl (ORCPT ); Fri, 30 Oct 2020 06:45:41 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 143B820720; Fri, 30 Oct 2020 10:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604054740; bh=pCZMS367mBBzkMxSGl3wcBU1XDLg7zL0+2tX4zU6st0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y0hgzA+zOSaiFzV2TBFrX44whdyEbMiJJdwuWz+AwbjR22K1vWTX5OMkQ0cIB1k1/ pmjmruhHvMtqPs4Ihbu58/Vne5COBkEPojmna+l8GkOJmspC59Xs0xDlropinMjTdu jZvn7VlKTakmzlPxuaW9IXrO6LIfrhDgfc+MEwUE= Date: Fri, 30 Oct 2020 11:46:28 +0100 From: "gregkh@linuxfoundation.org" To: HyungJae Im Cc: "manivannan.sadhasivam@linaro.org" , "linux-kernel@vger.kernel.org" , "linux-input@vger.kernel.org" , "rydberg@bitmath.org" , Jungrae Kim Subject: Re: (2) [PATCH v2] input: add 2 kind of switch Message-ID: <20201030104628.GB2395528@kroah.com> References: <20201029135715.GB3470996@kroah.com> <20201029132747epcms1p8fae559dff47bf0eebdcc9f94efd9a1bf@epcms1p8> <20201030043916epcms1p3b289ca5cd902883a97e7d13ceb5c1efb@epcms1p3> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201030043916epcms1p3b289ca5cd902883a97e7d13ceb5c1efb@epcms1p3> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 30, 2020 at 01:39:16PM +0900, HyungJae Im wrote: > Hello, This is Hyungjae Im from Samsung Electronics. > Let me answer your questions inline. > > >On?Thu,?Oct?29,?2020?at?10:27:47PM?+0900,?HyungJae?Im?wrote: > >>?From:?"hj2.im"? > >>?Date:?Thu,?29?Oct?2020?22:11:24?+0900 > >>?Subject:?[PATCH?v2]?input:?add?2?kind?of?switch > >? > >Why?is?this?in?the?body?of?that?patch? > > I read "how to send your first kernel patch", but still making so many mistakes. > I will be cautious with this. > ? > >>? > >>?We?need?support?to?various?accessories?on?the?device, > >>?some?switch?does?not?exist?in?switch?list. > >>?So?added?switch?for?the?following?purpose. > >>? > >>?SW_COVER_ATTACHED?is?for?the?checking?the?cover > >>?attached?or?not?on?the?device.?SW_EXT_PEN_ATTACHED?is?for?the > >>?checking?the?external?pen?attached?or?not?on?the?device > >? > >You?didn't?answer?the?previous?question?as?to?why?the?existing?values?do > >not?work?for?you?instead?of?having?to?create?new?ones? > > ?I think I should clarify this part the most for this review. > As you know, new added events both has similar existing events, > but it has to operate separately. > > First, SW_COVER_ATTACHED is similar with SW_MACHINE_COVER. > We need two events for our cover interaction. > One is to detect if flip cover is open/closed(covers screen or not), > and one is for detecting if cover is attached(detect if device is put into cover). > With the second event, we send event for attachment and start authentication > distinguishing if it was Samsung made cover. > > Second, SW_EXT_PEN_ATTACHED detects if pen is attached externally on tablet models. > It is different with SW_PEN_INSERTED since this is detecting pens like our NOTE series. > SW_EXT_PEN_ATTACHED has an unique role to set wacom tuning table differently > while pen is attached/detached. All of that needs to go in the changelog text for the individual patches when you submit them. But as Dmitry pointed out, it doesn't look like either of these drivers are needed at all, just use the gpio-keys driver instead. thanks, greg k-h