drivers: pwm: Kconfig: select counter driver if pwm is enabled

The pwm driver and the counter driver share a gpt module.
The interrupt service function of gpt is defined in the counter module.
Therefore, when the pwm is enabled, the counter module needs
to be enabled to avoid system crashes caused by unknown interrupts.
状态 作业 ID 名称 覆盖率
  Ztest
已通过 #41559
zgsz-02 generic
ztest_build_only

00:04:14

已通过 #41560
zgsz-03 with-device
ztest_device_test

00:06:09